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

How No print something when I have some Condition

edited October 2004 in General
Hi !
I don't known How don't print some record when I have a condition Example :

Don't print a Invoices Already Pay .
I have file for Invoices and the file por the Payment.

Thank you.

Comments

  • edited October 2004
    Hi Jose,

    Inside the DetailBand.BeforePrint event, you will need to check the
    condition. If the condition is not met, you can then set the Visible
    property of one or numerous report components accordingly. If you need to
    hide multiple components at once, you may think about placing them inside a
    TppRegion and only toggling the visibility of the region instead of each
    individual component.

    For example.

    procedure TForm1.ppDetailBand1BeforePrint(Sender: TObject);
    begin
    if ppReport1.DataPipeline['Already_Pay'] then
    ppRegion1.Visible := False
    else
    ppRegion1.Visible := True;

    end;

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2004
    The: ppRegion1.Visible := False

    Yes, It works, but when I take the paid invoices it let a blank space row,
    what can I do so I don't want that space in my report ?

    Thank you so much.


  • edited October 2004
    Hi Jose,

    Try setting the TppDetailBand.PrintHeight to phDynamic. This will shrink
    the detail band if no objects exist inside it.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

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