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;
Comments
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
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.
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com