Navigation:  Reference > Commands >

Update Report Data

Print this Topic Previous pageReturn to chapter overviewNext page

 

This command is used to update data in a buffer previously written to with the Output Report Data command. This is commonly used to update data in headers and footers, probably especially footers. Why is it needed? Because until the data is read (and likely printed in the details section(s), summary data is not available.

 

UPDATE_REPORT_DATA

 

RB_NUM f/c/eRequired - The Report Buffer Number.  This is the same number you used for creating the buffer in the Setup Report Buffer command.

 

FLDLST f/c/e1,f/c/e2..f/c/ex Required - The list of fields that will be updated in the buffer.  This command is different from Output Report Data in that it puts the name of the field first and the value second for each field you want to update.  For example, using the same sample we used in Output Report Data let's say we want to update the customer name and the customer code for some reason.  In this case you might do the following:

 

       update_report_data rb_num 1 fldlst 'bkar.custname','bkar.custcode'

 

       The program will check in report buffer 1 for the field name 'bkar.custname' (this must match the name you used in the report format in the DataField property).  If the field exists in the buffer it will then take the current value for the field in your program (file or defined field) and save that in the appropriate location in the buffer for the current report buffer 'record.'  

 

NOTE : The field names in the fldlst must be surrounded in quote marks. If you omit the quotes, you will receive no error message either while compiling or at runtime, and the report data will not be updated.

 

COMMENTS

This command cannot be used until you create a buffer with the Setup Report Buffer command and you've saved at least one record to that buffer with the Output Report Data command.  This command will only work on the last buffer record saved.  Once you execute the Output Report Data command that effectively hides any previous records saved and they can no longer be updated.

 

SAMPLE

update_report_data rb_num 1 fldlst 'bkar.custname','bkar.custcode'

 

 

 

SEE ALSO

PRINT_REPORT

 

 

 

 

 


Page url: http://www.cassoftware.com/tas/manual/updatereportdata.htm