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.


DECL/STRING,ST1,ST2,ST3,ST4,DATE,TIME,WO,SN,SOUT1,SOUT2,SOUT3,SOUT4


  • 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.


DATE='DATE :'


  • 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:


ST1=OBTAIN/KEYBRD,'ENTER DATE'


  •  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. 


SOUT1=DATE+ST1


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:


CH(1)=CUSTOM/'@SOUT1'



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 


R(1)=REPORT/CH(1)

OUTPUT/R(1)


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):


DECL/STRING,ST1,ST2,ST3,ST4,DATE,TIME,WO,SN,SOUT1,SOUT2,SOUT3,SOUT4

DATE='DATE :'

ST1=OBTAIN/KEYBRD,'ENTER DATE'

SOUT1=DATE+ST1

CH(1)=CUSTOM/'@SOUT1'

R(1)=REPORT/CH(1)

OUTPUT/R(1)

TIME='TIME :'

ST2=OBTAIN/KEYBRD,'ENTER TIME'

SOUT2=TIME+ST2

CH(2)=CUSTOM/'@SOUT2'

R(1)=REPORT/CH(2)

OUTPUT/R(1)

WO='WORK ORDER :'

ST3=OBTAIN/KEYBRD,'ENTER WORK ORDER'

SOUT3=WO+ST3

CH(3)=CUSTOM/'@SOUT3'

R(1)=REPORT/CH(3)

OUTPUT/R(1)

SN='SERIAL NUMBER :'

ST4=OBTAIN/KEYBRD,'ENTER SERIAL NUMBER'

SOUT4=SN+ST4

CH(4)=CUSTOM/'@SOUT4'

R(1)=REPORT/CH(4)


  • 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.