Preserve space when hiding text field in rdlc file

I created a report with an image on the left, which is conditionally displayed based on the parameter passed to the report. On the right side of the page there is another text box.

I observe that when the Hidden image property is set to "True", the text box on the right is in the right place. If the Hidden property is set to value = IFF (1 = 1, true, true), then the text field on the right is shifted to the left, and the report looks ugly.

How can I get a hidden object to do all the necessary space and set it as hidden with an expression?

+6
source share
1 answer

To prevent the behavior that you see, you can put another object (for example, a rectangle or line) in your constructor in the same place as your image, and occupy it in the same horizontal space as the image on the left.

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

I would save this object in the designer and set its color according to the background color (for example, white) at run time so that you would not see it.

I would also give it some descriptive name, for example, LineWhichPreventsTextBoxFromMovingWhenImageIsHidden, so that some future report maintainer would not accidentally delete it and thus cause a violation.

+11
source

Source: https://habr.com/ru/post/917062/


All Articles