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

SupressRepeatedValues problem

edited September 2004 in General
Hello,

I have a report in which I'm trying to display something like this:

9/10/2004 7:00 AM Text1
7:00 AM Text2
7:00 AM Text3

9/9/2004 7:00 AM Text4
7:00 AM Text5
7:00 AM Text6

I use a TppDBText to display the text for the date. and I set
SupressRepeatedValues to true and everything appears to behave properly.

The problem I run in to is there are a set of user filters that a user can
turn on and off depending on what they want to display. So in the
OnBeforePrint event of the ChildReport I set the visibility of the detail
band based on the filter value. Something like this:

DetailBand1.Visibility := (FilterValue);

When a user has "Text1" in the report filtered out I get a report like this:

7:00 AM Text2
7:00 AM Text3

9/9/2004 7:00 AM Text4
7:00 AM Text5
7:00 AM Text6

instead of what I want which is this.

9/10/2004 7:00 AM Text2
7:00 AM Text3

9/9/2004 7:00 AM Text4
7:00 AM Text5
7:00 AM Text6

same thing happens if say the user filters out "Text4" I end up with this:

9/10/2004 7:00 AM Text1
7:00 AM Text2
7:00 AM Text3

7:00 AM Text5
7:00 AM Text6

instead of this:

9/10/2004 7:00 AM Text1
7:00 AM Text2
7:00 AM Text3

9/9/2004 7:00 AM Text5
7:00 AM Text6


How can I accomplish what I want?

Thanks in advance,
Rodger Van Kirk

Comments

  • edited September 2004
    Hi Rodger,

    How are you suppressing the text object with the date for every detail band
    but the initial one in each group? You need to add some more logic there to
    go ahead and print this label in the next detail band in the first one is in
    fact being filtered.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2004
    I'm not doing any code to get the date to show up in only the first detail
    band of the group. I just set the SupressRepeatedValues property to true
    and RB is taking care of suppressing it.

    Rodger Van Kirk


  • edited September 2004
    Hi Rodger,

    Unfortunately the SupressRepeatedValues feature is not advanced enough to
    know when you are toggling the visibility of the detail band. You will need
    to supress the repeated values manually adding another check for the
    visibility of the detail band as well. Something like the following in your
    DetailBand.BeforePrint event should work.

    if ppReport1.DataPipeline['CustNo'] <> FOldCustNo then
    begin
    if ppReport1.DetailBand.Visible then
    begin
    ppDBText1.Visible := True;
    FOldCustNo := ppReport1.DataPipeline['CustNo'];
    end;
    end
    else
    ppDBText1.Visible := False;

    --
    Best Regards,

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