Custom Report Headers can only be created using DMIS commands in your program. Following steps will give an example of how to create such headers using DMIS commands in CAPPS:
- First declare string variables to create custom titles.
- Here is an example of assigning a text for your string variable.You can write the title between quotation marks.Also this is where you can adjust the space in between title & column.
- OBTAIN/KEYBRD command will prompt a dialog to the operator asking to enter some information during program execution. In the example below, it tells the operator to enter date information, as it is indicated in the query text (text between quotation marks). Once the operator enters the date to the dialog, the entry will be assigned to a String variable ST1 as shown below:
- String concatenation can be done using "+" sign between any number of String variables as shown below. Note that the assignment operator "=" is used to assign combined concatenated string to SOUT1, which is another String variable declared above.
Important Note: Any type of operation performed on the variables requires correct type of variable. CAPPS doesn't infer, nor check the variable type during compilation/execution. Assigning or performing operations on a wrong variable type may caused empty outputs. Empty variables doesn't cause any problems during compilation/execution but it may cause wrong outputs in report.
- CH(1) is a special variable which represents the header information in CAPPS. Once all custom report headers and information is entered to are combined under a String variable SOUT1, we can assign SOUT1 to CH(1) as shown below:
R(1) represents the report header in CAPPS, and whatever is assigned to it will be used to create the report header using OUTPUT command follows it. Since we assign custom header
Important Note: Note that there is no simple way to concatenate the custom report headers created so each header should be output using OUTPUT/R(1) before moving to the next custom report header entry. An example of this is shown below.
- Here is an example of the above commands combine together (You can copy and paste it to your DMIS Window to see how it works):
WO='WORK ORDER :'
ST3=OBTAIN/KEYBRD,'ENTER WORK ORDER'
SN='SERIAL NUMBER :'
ST4=OBTAIN/KEYBRD,'ENTER SERIAL NUMBER'
- The report outcome will be something like:
Important Note: Note that CH number changes with every title. You can change the variable names what ever you like, but it is recommended not to use any space or special characters in a variable, such as PRT_NUM or MCH OPER.