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

SuppressRepeatedValues does not work when toggling Detailbands Visible on/off 2 filter

edited February 2014 in General
Hi,

When you filter records to print by controlling the Visible property off the
DetailBand in the DetailBand BeforePrint event the SuppressRepeatedValues
does not work.

It doesnt take into account the detailband isnt printed and the next visible
detailband column will b suppressed.

The routine below works but how do i find out if a new page is started in
the BeforePrint event, i tried ppDetailBand_BNC.Overflow but it never gets
True when I print the report.

if ppLDBNREK.PriorValueSame then
begin
if ppDetailBand_BNC.Overflow then
begin
ppLDBNREK.Visible := True;
ppLDBNNAAM.Visible := True;
ppLDBNBKJ.Visible := True;
end
else
begin
ppLDBNREK.Visible := False;
ppLDBNNAAM.Visible := False;

if ppLDBNBKJ.PriorValueSame then
ppLDBNBKJ.Visible := False
else
ppLDBNBKJ.Visible := True;
end;
end
else
begin
ppLDBNREK.Visible := True;
ppLDBNNAAM.Visible := True;
ppLDBNBKJ.Visible := True;
end;

Greetings,
Filip Moons



---
Dit e-mailbericht bevat geen virussen en malware omdat avast! Antivirus-bescherming actief is.
http://www.avast.com

Comments

  • edited February 2014
    Hi Filip,

    When a band's visibility is set to False, none of its the components are
    generated so the SuppressRepeatedValues feature will not take those
    values into account.

    If you would like to filter the data given to the report, it would be
    better to do so inside the dataset rather than the report.


    The BeforePrint event fires too early to detect if the band is
    overflowing or not. You will need to use an event that fires after the
    band generates to get a more accurate value.

    Best Regards,

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