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;
Here the block in the calc of the Report > Detail:
procedure DetailBeforePrint;
begin
Detail.Visible := false; // setting to false causes hang
end;
Comments
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.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
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.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com