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

Detail band

edited March 2007 in RAP
Hello , I was using the following to control/sort a report;

begin

DBText1.Visible := DBitem['CPERUNIT'] <> DBinventory['STDCOST'];

DBText3.Visible := DBitem['CPERUNIT'] <> DBinventory['STDCOST'];

DBText6.Visible := DBitem['CPERUNIT'] <> DBinventory['STDCOST'];

DBText7.Visible := DBitem['CPERUNIT'] <> DBinventory['STDCOST'];

DBText8.Visible := DBitem['CPERUNIT'] <> DBinventory['STDCOST'];

DBText9.Visible := DBitem['CPERUNIT'] <> DBinventory['STDCOST'];



end;

It seems to me there should be an easier way to do this by dealing with the
detail band as a whole , rather than each DBText in it. Something like

if X<>y then detail band visible.

Any thoughts would be appreciated.



Thanks,

Chris

Comments

  • edited March 2007
    Hi Chris,

    Inside the DetailBand.BeforPrint event, you can toggle the visibility of the
    entire detail band based on a single condition. Another way would be to
    place all your DBTexts inside a TppRegion and toggle the visibility of the
    region.

    Note: Don't forget to assign the detail band's visible property back to
    True if the condition is not met.

    --
    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.