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

Hiding or Skipping based on Group data

edited November 2005 in General
Hi,

I'm using RB9 Ent with D2005.

I have a report that has 3 groups.

If the middle grouping has less than 2 records, then I would like the report
to skip without displaying anything for all 3 groups and start handling the
next outermost group.

Is there an easy way that I can achieve this behaviour?

Regards,
Ben

Comments

  • edited November 2005
    Hi Ben,

    Unfortunately ReportBuilder traverses your data as is, beginning to end.
    Once the middle group's data is traversed, the first group has already been
    generated and printed. One option would be to pre-process your data to find
    out how many records are going to be printed for each group before the
    report is even generated. Then you could add or remove groups as you need
    based on this information.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2005
    Hi Nico,

    Pre-Process is not an option for me.

    Is there a way I can use Pass1 to determine the number of records in the
    middle group and then use Pass2 to set visible to true/false based on the
    results from Pass1 ?

    .Ben

  • edited November 2005
    Hi Ben,

    Creating a two pass report could possibly work, however the purpose of the
    first pass in ReportBuilder is to determine spacing for proper pagination.
    You could definitely find out the data and remove the group but I'm not sure
    if the report will look the way you intend.

    One other option would be to generate the report to a virtual "dummy" device
    initially before printing it to screen or printer. For instance, if you
    create a generic TppDevice object and set its Publisher equal to the
    Report's, tne call PrintToDevices, the report will generate with no output.
    Then after you gather the proper information, you could alter the report as
    you need. Note that the entire report is generated so depending on the
    report size, this method could take some time.

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