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

Report Builder hangs when setting Detail visible to false

We have a report builder script that used to set the Detail.Visible to false if a condition was met. This now seems to cause report builder to hang indefinitely. There seems to be nothing else needed to cause this problem. Is this a bug? Using Report Builder 23.

Here the block in the calc of the Report > Detail:
procedure DetailBeforePrint;
begin
Detail.Visible := false; // setting to false causes hang
end;

Comments

  • Hi Charles,

    To better assist you, it would be helpful to understand the final goal of this code. While it's possible to set the visibility of the Detail band, this should be done selectively to conditionally hide specific details when necessary. It's uncommon to hide all details, especially if the report isn't connected to a dataset.

    Could you please share more details about what you're trying to achieve? That way, we can work together on a solution that best fits your needs.
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • Hello, I'm working with an existing code base where there's already a handful of cases where this was done, we have a few dozen reports so it's a little clunky to check everything. I'm able to rework the instances where I find it. I'm mostly bringing it up as it seemed like a bug, if setting the detail visibility causes report builder to hang I'd expect a compile time or runtime exception as opposed to everything freezing completely.
  • Hi Charles,

    Thanks for the further information.

    >> there's already a handful of cases where this was done

    Does this mean that this worked for an earlier version of ReportBuilder and is now broken? If so, please let me know which version this was and I can research what was changed. I tested this going back 6 versions and the behavior was the same.

    From my testing the behavior you describe occurs in two scenarios:

    1. Report; disconnected from data; AutoStop set to True; DetailBand.Visible set to False.

    2. Report; disconnected from data; AutoStop set to False; DetailBand.Visible set to False; PageLimit set to a value greater than 0.

    While we try to gracefully handle report designs that will cause issues such as infinite generation, there are still some rare occasions where it can still happen. I will add logic to the next release to warn the developer/designer that this is not a viable combination.
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
Sign In or Register to comment.