-- BeforeGenerateActionInReports.txt

Friday, March 9, 2007

Tip of the Day:
Defining TEMPORARY Table(s) as Before Generate Action in Reports

Supported Versions:

. R:BASE Turbo V-8 for Windows (Build: 8.0.15.30302 or higher)
. R:BASE 7.6 for Windows (Build: 7.6.1.30302 or higher)
. R:BASE C/S:I 7.6 for Windows (Build: 7.6.1.30302 or higher)

Did you know that you can design a report and then use TEMPORARY
tables to populate the data dynamically using the "Before Generate"
action in Reports?

Similarly, once the report is designed and finalized, you can
use the "On Before Design" action to create the required table(s)
before bringing up the same report in report designer.

Here's a sample report to demonstrate the use of "Before Design"
and "On Before Generate" actions in Reports.

http://www.razzak.com/sampleapplications/
Defining TEMPORARY Table(s) as On Before Generate Action in Reports

Steps:

01. Unzip the file in your sample RRBYW10 folder, such as:
    C:\RBTI\RBG76\Samples\RRBYW10
    or
    C:\RBTI\RBG8\Samples\RRBYW12

    The zip file include two files:
    tCustomerList.RPT and tCustomerList.LOB

02. Start RBG76 or RBG8 and CONNECT to RRBYW10 or RRBYW12

    At the R> prompt:

    RUN tCustomerList.RPT

03. At the R> prompt:

    LIST REPORTS

    Notice that tCustomerList report is based on tCustomerList
    table. However, there is no such table defined in RRBYW10
    or RRBYW12

04. If you the open the tCustomerList report in Report Designer,
    notice that the required table is dynamically created.

05. If you run the tCustomerList report, notice that the required
    table with populated data is dynamically created.

To understand the entire logic, open the report in Report Designer
and review the Before Generate ... and On Before Design actions.

Report Designer|Main Menu|Report|Actions|Before Generate ...

Report Designer|Main Menu|Report|Actions|On Before Design ...

Enjoy and make sure to have fun!

Very Best R:egards,

Razzak.