LoadGridInit and LoadGridNext Event Paragraphs

Similar to the report element itself, the Grid control contains LoadGridInit and LoadGridNext print events. You name and code these paragraphs using the steps described Adding Report and Report Element Events. The code in these paragraphs is used to initialize and READ data into your Grid control.

For example, you might define a LoadGridInit paragraph similar to this:

Myreport-LoadGridInit.
           move low-values to sales-key
           start sales key >= sales-key
           read sales-key next
                at end
                move 0 to myreport-mygrid-LOADGD-SW
           end-read
           .

And a LoadGridNext paragraph similar to this:

Myreport-LoadGridNext.
           read sales-key next
                at end
                move 0 to myreport-mygrid-LOADGD-SW
           end-read
           .
Note: Included with AcuBench is a sample report called report1h that utilize these event paragraphs. See Sample Reports for details on locating and using AcuBench sample reports.

The same advantages of using the events described in BeforeDoPrint and AfterDoPrint Event Paragraphs, apply to these events as well.