This command is used to output data to a buffer previously created with the Setup Report Buffer command.
OUTPUT_REPORT_DATA
RB_NUM f/c/e | Required - The Report Buffer Number. This is the same number you used for creating the buffer in the Setup Report Buffer command. |
COMMENTS
This command cannot be used until you create a buffer with the Setup Report Buffer command. For each line or group of lines that you have on the report you would create a record by saving data to the buffer using this command. So, for example, if you were creating a simple report of customer codes and names you would probably setup a single buffer with just the two fields, and for each customer you wanted to be part of the report, you would execute this command with the field list made up of the code and name. See the example below for what that program code might look like.
You would also use this command if you are saving data multiple times to the same record. However, if you are updating separate values within an existing buffer record you would use the Update Report Data command instead of this one.
The program, WTASDMGR.SRC, contains a complete printing routine that displays a multi-level printing process. It starts at the label tbPrint.Click. WTASDMGR.RTM is the actual report format that is used. We provide the program in source format, documented internally, so that you can see first hand a multi-level report.
SEE ALSO
EXAMPLE
(* The following is a what a simple report might look like that
prints a customer code and name from the file BKARCUST.
This report assumes that the file has been opened someplace
else and that the handle field name is bkarcust_hndl.
The first step is to create the buffer for the data we will save.
Notice that we use '_' in the setup and '.' in the output. *)
setup_report_buff rb_num 1 reportname 'simple'
(* The SCAN command will loop through the file starting at
the beginning and retrieving each record in customer code order. *)
scan @bkarcust_hndl key bkar.custcode
output_report_data rb_num 1
ends
// at the end of the scan we execute the report
print_report
// to clear the report buffer
setup_report_buff rb_num 1 reportname 'simple'
ret
Page url: http://www.cassoftware.com/tas/manual/outputreportdata.htm