Wednesday, December 5, 2007

Tip of the Day: Defining Built-in PAUSE Messages in Reports

Section: Reports
Versions: R:BASE 7.6, C/S:I 7.6 and Turbo V-8 for Windows

There are situations where a report with hundreds of thousands
of records may take a while to print to a file or on screen,
and you may want your end-users to stay tuned while the report
is being prepared.

The traditional approach of displaying PAUSE 3 option in a
command file, before PRINTing the report, is good. However, as
soon as the report starts printing, the report is taking over
and your good old PAUSE command is no longer staying on top.

So, how do we print a huge report and display the PAUSE
message until the entire report is actually generated.

Did you know that you can use the PAUSE 3 command with a cool
message such as "Before Generate..." action and then the "CLS"
command to clear PAUSE 3 message when the report is actually
finished as "After Generate..." action?

Here's how:

01. Start R:BASE 7.6 or Turbo V-8 for Windows

02. Open your favorite report in Report Designer

03. Use the following code as "Before Generate..." action

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

    -- Before Generate Action in Report
    CLS
    GETPROPERTY REPORT REPORT_NAME vReportName
    PAUSE 3 USING +
    'Preparing Report ... Please Stand By  ...' +
    CAPTION .vReportName +
    ICON APP +
    OPTION GAUGE_VISIBLE ON +
    |GAUGE_COLOR 2708091 +
    |GAUGE_INTERVAL 10 +
    |MESSAGE_FONT_NAME VERDANA +
    |MESSAGE_FONT_SIZE 10 +
    |MESSAGE_FONT_COLOR RED +
    |THEMENAME R:BASE Rocks!
    RETURN

04. Use the following code as "After Generate..." action

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

    -- After Generate Action in Report
    CLS
    CLEAR VARIABLE vReportName
    RETURN

05. Save the report

06. You may "Preview" the report while in Report Designer,
    PRINT the report using the Database Explorer or use the
    PRINT reportname ... OPTION command to see the results.

    Notice the real-time PAUSE 3 message with report name
    as caption and moving gauge stays on screen until the
    entire report is completely generated.

Enjoy and make sure to have fun!

Very Best R:egards,

Razzak.

P.S.
All reports in the latest versions of Running R:BASE Your Way!
(Part 14) include this feature.

--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]

(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE: Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body, place any text to search for.
================================================


Reply via email to