Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Preserve white space when hiding textbox in rdlc file

I've created a report that has an image on the left that is conditionally visible based on a parameter that's passed in to the report. There is another textbox on the right side of the page.

I'm observing that when the image's Hidden property is set to "True" then the textbox on the right side stays in the right place. When the image's Hidden property is set to =IFF(1 = 1, true, true), then the textbox on the right is being shifted to the left, and the report looks ugly.

How can I have the hidden object still take up all the necessary space, and set it as hidden with an expression?

like image 477
Vic Peters Avatar asked May 30 '12 22:05

Vic Peters


1 Answers

To prevent the behaviour that you are seeing, you can place some other object (like rectangle or a line) onto your designer in the same location as your image and have it take up the same horizontal space as the image on the left.

When the image is hidden, this object will remain there and prevent the right side textbox from moving.

I would keep this object visible in the designer and set its colour to match your background colour (e.g., White) during runtime so that you don't see it.

I would also give it some descriptive name like LineWhichPreventsTextBoxFromMovingWhenImageIsHidden so that some future maintainer of the report does not inadvertently remove it and thus cause a breaking change.

like image 128
Steven Schroeder Avatar answered Sep 21 '22 02:09

Steven Schroeder