At 09:50 PM 6/27/2012, Sharon Lima wrote:

I am back working on a R:Base 7.6 Application.

I have the need to use the Page Number of a report in an IF-THEN statement.

Is there a variable name for Page Number like #DATE for the current date?

I know Page Number can be assigned so it must have a variable name behind
the scenes.

Thanks for help here.


Here is a very simple and eloquent approach to achieve such goal.

While in Report Designer:

01. Define a global variable, such as vCurrentPageNumber, as
    On "Before Generate ..." Report Action

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

    CLEAR VARIABLE vCurrentPageNumber
    SET VAR vCurrentPageNumber INTEGER = 0
    RETURN

02. Enable Cache Pages option

    Main Menu | Report | Cache Pages

    The default is set to OFF

03. Now capture the current page number using the following EEP as
    After Generate Custom EEP ... for Page Header Band

    Right-click on Page Header Band | After Generate Custom EEP ...

    SET VAR vCurrentPageNumber = (.vCurrentPageNumber + 1)
    RETURN

This approach will provide you with a global variable which you
can capture to achieve your specific objective.

And that's all there is to it!

Very Best R:egards,

Razzak.

www.rbase.com
www.facebook.com/rbase

Reply via email to