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

Not Printing Report if conditional detail always not visible

edited July 2003 in General
Hi,

I've got no general Header.
Only 1 group with it's header and footer.
The changing group is on one field and "change page" is checked.
In the DetailBeforePrint I've got : Detail.Visible:=aCondition;

Somme time Detail is never visible, so It's printing One page with the
header group and the footer group.

I would like Printing the group only if there one detail visible.

I try to put 2 pass + Boolean in DetailBeforePrint and Header and footer not
visible if the boolean is false, but it's printing an empty sheet...

Thanks for your help.

kloo

Comments

  • edited July 2003
    Hello,

    Try using the GroupHeaderBeforePrint event to set the visibility of the
    Group Header and Footer. The reason they are staying visible is that they
    have already been generated and printed when the DetailBandBeforePrint event
    fires.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2003
    Hello,

    event


    They not staying visible, they are printed empty since visible=false.
    I would like in the OnStartSecondPass, aborting the report for a groupdetail
    if in the first pass, my boolean always false, since no detail is visible
    (by condition).

    Is existing a way to Aborting not all the report, but only the sheet for a
    group ?

    If not, can i have a way that my datasoucre don't send the information form
    an event in delphi, so the report will never know this group that empty (by
    a conditional) ....

    Thanks

    kloo
  • edited July 2003
    Hi Kloo,

    You can not change the pagination of a report in the second pass. Once the
    second pass begins, all pagination has been measured and allocated. I would
    suggest preprocessing the data you send to the report so that you will not
    need to try to disable any of the groups and the data will be in the order
    you need..

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2003
    Hello,

    the

    ok


    Well, I can't change my Query.
    If I write a ppDBPipeline1.OndataChange
    how can I "not send" the record to the report if condition is false ?

    Thanks

    kloo
  • edited August 2003
    Hi Kloo,

    I would try using a conditional statement to find out what the group value
    in the DetailBand.BeforePrint event. Then you could set the GroupHeader and
    GroupFooter bands' visibility to false and temporarily disconnect the
    datapipeline so the detail band will not print that group. When
    disconnecting the datapipeline, be sure to set the pipeline component's
    visibility to false to be sure the report will not use it.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.