skip to main content

Integrated Development Environment (IDE) : Working with Screen Programs and File Layouts : Creating a new Report : How to print Reports

How to print Reports
Retrieving data for the Report
The way you retrieve data for the Report depends if you rely on Tagged Areas or not in your code.
For programs that don’t use Tagged Areas (default), follow these steps:
Code example:
           move low-value to prd-key
           start product key not < prd-key
                 move 0 to report-1-doprintrtn-loop
                 move 1 to report-1-doprintrtn-loop
                 read product next no lock
                       move 0 to report-1-printrtn-loop
<ReportName>-doprintrtn-loop is a variable declared automatically by the IDE. When you set this variable to 0 the print loop is interrupted, when you set it to 1 the print loop continues.
Code example:
           move 1 to report-1-doprintrtn-loop
           read product next no lock
                   move 0 to report-1-printrtn-loop
For programs that use Tagged Areas, follow these steps:
 
Code example:
           move low-value to prd-key
           start product key not < prd-key
               perform until 1 = 2
                 perform IS-REPORT-1-DO-PRINT-RTN
Note that for each record read in the above loop, the paragraph IS-<ReportName>-DO-PRINT-RTN is performed. Such paragraph is responsible for printing the data.
Printing the Report
The following paragraphs are always generated for programs with reports. You can perform them in your program logic. Choose the proper one according to the desired printer output:
is-report-name-preview
The preview dialog is very similar to the one shown by the SpoolPrinter class (com.iscobol.rts.print.SpoolPrinter) and the Print Preview, but the preview dialog generated by the IDE allows also to export the report to xls and xlsx files.
See Exporting to Excel file below for details.
is-report-name-print
is-report-name-print-pdf
is-report-name-print-xls
is-report-name-print-xlsx
is-report-name-print-tofile
is-report-name-setup-print
Exporting to Excel file
The Export menu in the print preview dialog allows to export the current report to either a XLS or XLSX file.
The export process can be configured through specific properties. See Export to Excel feature for details.
There are few limitations if compared with the HTML report:

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left