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

Hide group headers when no details.

edited January 2006 in General
I need to hide the group headers (multiple groups) when there is no detail
data. I found this post:
http://216.101.185.148/scripts/isapi.dll/article?id=36C57662&article=3624280


from Jim Bennett of Digital meaphors:
Something like this should do the trick:

http://www.digital-metaphors.com/tips/HideGroupHeaderWhenNoDetails.zip

but this file no longer exists there, do you still have this demo file?

Thanks,
Rob

Comments

  • edited January 2006
    Hi Rob,

    The link should work correctly now. Sorry for the inconvenience.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2006
    Thanks, the only problem is I must be a little dense today.

    From looking at the project, it looks like you are trying to hide the detail
    band if the CustomerID is 1221, then in the second pass hide the Group
    header if the detail band is not visible.

    But the project still prints the the header for 1221 and all the records
    that go with it. So I must not understand the purpose of this project.

    Could you let me know what it is supposed to do?

    Thanks in advance,
    Rob

  • edited January 2006
    Hi Rob,

    Sorry about that, I didn't look at the example, only fixed the link :).

    After taking a look it seems this example is not doing what you need. The
    issue is that ReportBuilder traverses the data as the report is generated,
    preventing you from finding out if there is no data for a group before the
    repor is generated. A couple things you might try are...

    1. Pre-process you data and determine which groups have no data before the
    report is printed and hide those groups as needed.

    2. In the DetailBand.BeforePrint event (perhaps) count how many detail
    bands are generated per group in the first pass of the report. If, when the
    group footer is printed, the count is 0, hide the group header for the
    second pass.

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