troubleshooting Question

Report Builder displays different when run more than once.

Avatar of light_bulb
light_bulbFlag for United States of America asked on
19 Comments1 Solution325 ViewsLast Modified:

I have a Report Builder report that I'm trying to dynamically size the height of the detail band.  Here's the code:

If dm.tblOutput.FieldByName('Unique').AsInteger = firstNonZero Then
        ppDetailBand1.Height := 0.6979;
        lnOptional.Visible := True;
        lblOptionalPricing.Visible := True;
        lnOptional.Visible := False;
        lblOptionalPricing.Visible := False;
        If dm.tblOutput.FieldByName('Unique').AsInteger > firstNonZero Then
            ppDetailBand1.Height := 0.5000;

Basically, I'm trying to display/hide a line and a label on the detail band based on the FieldByName('Unique').As Integer value.  If it's greater than firstNonZero, I just hide the label and line and shrink the Height of ppDetailBand1 to 0.5000 to eliminate white space.

This code works perfectly the first time the report is run in my program.  But when it's run more than once, the ppDetailBand1.Height stays at 0.5000, so there's not enough space to display the line and label properly.  I don't understand why it won't reset back to 0.6979 when the report is run a second time??!!

How can I make this work?


Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 19 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 19 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros