问题
I need to increase the height of the page header dynamically. There is a parameter to increase or decrease the size of the page header. ie, By default or If Parameter value is "Yes" then increase the size of the header to 1.5 inch. If param value is "No" then decrease height to 0.5 inches.
I tried many approaches like, Inserting textbox into page header and through line break increasing and decreasing the height. But, when exported to pdf, the changes in height is not showing correctly.
Any help to this problem will be highly appreciated.
Thanks
回答1:
Yes, it is possible. One need only be a little creative :)
- Create a Textbox in your Report Header and put it out of the way to one side, all the way to the top of the Header.
- Set the size of the Textbox to .01in x .5in.
- Set all the Padding of the Textbox to 0in except for the Top.
- Set the Top Padding:
=iif(Parameters!YourParameterName.Value = "Yes","0.5in","1.5in")
Here are some pics of a test I did.


Instead of a "Yes/No" Parameter, you could even have a Float Parameter and have the user enter in the Header Height in inches. To do this, do the same as above only set the Top Textbox Padding to: =Parameters.YourHeaderHeightParameter.Value & "in"
.
来源:https://stackoverflow.com/questions/22855384/how-to-dynamically-increase-the-page-header-height-in-ssrs-2008