Custom Report Headers can only be created using DMIS commands in your program and is visible in Classic View

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 enter any text between single 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 DATE_VALUE as shown below:


  •  String concatenation can be done using CONCAT(String1, String2, ...) command. Any number of string variables can be combined separated by commas. Note that the assignment operator "=" is used to assign combined concatenated string to COMPLETE_HEADER, 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 a custom header information in CAPPS. Once all custom report headers and information is entered to are combined under a String variable COMPLETE_HEADER, we can assign it 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.

  • Attached text file includes DMIS codes that will generate a custom report header for you. You can safely copy and paste the code to a test program, and execute it to see how it works.