The REPORT Statement

REPORT statements define the characteristics of reports such as the number of lines per page, line length, and so on. For basic reporting you may code a REPORT statement yourself, but usually you’ll let the Jazz assume or create one.


REPORT statements have this general format: -

REPORT [(nbr)] [Option]…


If present, a REPORT statement must precede the first PRINT statement for the report. REPORT statements may be omitted, in which case Jazz will assume characteristics as if a REPORT statement with PAGESIZE(60) WIDTH(132) is present.


Basic options are: -


(nbr)    This allows one program to print several separate reports, and corresponds to the REPORT(nbr) option on PRINT statements.  For example,




    REPORT(1) PAGE(50) WIDTH(120);

    REPORT(2) PAGE(60) WIDTH(132);



      PRINT (R1.A, …) REPORT(1);

      IF condition THEN

          PRINT (…) REPORT(2);

      END IF;



            Although it is quite easy to create a Jazz™ program that produces several reports, since the sequence of lines in the report is controlled by the overall program logic, particularly the sequence of records read by PROCESS statements, mostly you’ll write programs producing only one report.


            If (nbr) is omitted then (1) is assumed. Thus

          REPORT PAGE(50) WIDTH(120);

is equivalent to

    REPORT(1) PAGE(50) WIDTH(120);


    PRINT (R1.A, …);

is equivalent to

    PRINT (R1.A, …) REPORT(1);


Nbr must be from 1 to 99.


PAGE(nbr).   The number of lines per page.


WIDTH(nbr).   The number of printed characters per line. This excludes any control characters that may be placed ahead of the printed line to control spacing.


HEADING string.  The report heading, printed centred at the top of every page. If omitted the report heading is “REPORTn” where “n” is the report number.


SEPARATOR string.  This defines the characters that appear between two fields.  These separator characters do not appear between a field and a constant. If omitted, SEPARATOR ‘ ’ is assumed, i.e. a single blank between fields.

            Write SEPARATOR ‘’ if you want no inserted space between fields


            Write something like SEPARATOR ‘|’ if you want a visible separator. Of course you can insert several spacing characters if you want, with something like SEPARATOR ‘|  


            If you also want these separator characters to appear around constants simply add them into the value of the string.


            The separator characters do not appear at the beginning or end of lines, even when a second line is caused by a line overflow.


More advanced options will be created with the Report Designer, and will be discussed later when that feature is developed.