Table of Contents

Printing Single or Multiple Records in Reporter (Functions/Subroutines/Programs,Reporting and Printing)

Created at 22 SEP 1997 03:49PM

When you need to only print a specific record or a specific set of records from a file, you can actually write the key or keys to a specific record in the SYSLISTS table and call them from the reporter.  The following is an example of how to do this.

 

***********************

Declare Function Repository

open 'SYSLISTS' to hSysLists then

write <key or set of keys to send> to hSysLists, 'KEY_PRINT_':@STATION then

            print=Repository("EXECUTE", SYSPROG*OIREPORT*RDLAYOUT*TEST.RPT")

            end

end

***********************

 

Line 1 declares the Repository function.

Line 2 opens the SYSLISTS table to a variable hSysLists.

Line 3 writes the key or keys to a unique record in hSysLists.  (The unique record is ensured by using the station Id)

Line 4 calls the report to print.

 

**The next step is to tell the reporter where to find the key or keys to print.

From the Reporter menu select  Tools  -  Query .  This will bring you to the Query screen where you will select  Selection Criteria  from the Categories on the left.  From here you will choose  Basic +  from the Language drop down combo box.  In the formula edit box is where you can specify where to get the key or keys to print.  The following code will tell the Reporter to get them from the SYSLISTS table at the specified key.

 

GETLIST KEY_PRINT_@STATION