Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Regions Visibility...When?

edited June 2002 in General
Hi All,

I am using the reports "Header" band to print some information. I have
various regions in this band. I want to show these regions depending on the
page number. There are some regions which I want to show on all pages and
then there are some other regions which I want to show only on the first
page.

I am looking for the right event to set the visibility of these regions.
Note that my report is a single pass report and I want to leave CachePages
to False.

I tried to set it in the Tppreport.Before print event but read in the help
that the TppReport's "BeforePrint" and "AfterPrint" events only fire when
they are printed to the screen, which I don't in some cases. So, in general
what would be the best event to control the visibility of elements in a
band?

Thanks in advance,
Vikram

Comments

  • edited June 2002
    Use the header band's BeforePrint event to toggle the Visible property of
    the regions based on the page number. This event will fire right before the
    header band on each page prints.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited June 2002
    Thank you very much.
    One more clarification, so I use the "AbsolutePageNo" property of the
    Tppreport to get the page number. But, if I have the region in a subreport
    then I should use the subreport's "AbsolutePageNo". Is this correct?

    Also in the last part of my question:
    "read in the help that the TppReport's "BeforePrint" and "AfterPrint" events
    only fire when they are printed to the screen...." Is this also correct? I
    use Pragnaan's export dvices to generate the report so what which events do
    I use instead of the Report's "BeforePrint" and "AfterPrint" events?

    Vikram

    "Alexander Kramnik (Digital Metaphors)" wrote
  • edited June 2002
    That depends on how you're using the PageNo to determine visibility. The
    subreport's AbsolutePageNo will give you the relative PageNo, that is every
    subreport will start with page 1.

    Not true, they fire anytime Print is called on the report (they won't fire
    when PrintToDevices is called), regardless of the target device.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited June 2002
    That answers my questions.
    Thank you,
    Vikram

    "Alexander Kramnik (Digital Metaphors)" wrote
This discussion has been closed.