5.4.9 Reporting Q & A
The following list describes some of the most common problems that occur when first using LANSA to produce reports and their causes.
Why do fields come out as blanks or zeros?
The most common cause is that the field has been referenced in line definition commands, but is not actually being retrieved from the database. Check all database read commands such as SELECT, FETCH, etc to make sure that the field is in fact being retrieved from the database.
What causes level breaks to appear randomly or out of order?
The most likely reason is that the data being provided to the print command is not in the expected order. Remember that LANSA does not sort the data automatically. The data must be accessed via a file that presents it to the RDML program in the required order. Check the keys of the file being used to ensure the data is being retrieved in the expected order, then check that all "trigger" parameters are consistent with the processing order.
What causes my last set of level breaks or grand total to be missing?
The most common cause is a missing ENDPRINT command. The last set of level break lines (including "grand totals") must be "flushed" to the report by executing an ENDPRINT command. If no specific ENDPRINT command is coded, it will be automatically issued when the function ends. This method of automatically issuing an ENDPRINT may not always achieve the desired results.
Ý 5.4 Producing Reports Using LANSA