How to set page height dynamically
Posted: Tue Sep 16, 2025 7:15 am
Hello,
now I'm making a template,it has 5 dataBands,each dataBand I leave 1cm,so I set default pageHeight to 6(with top,margin 0.5).
At the same time, I need to add some variables to control some of the dataBand enabled or disabled,so that height of rendered content may less than 5.
For example,if I disabled 2 of them,the content height is 5 - 2 = 3,and pageHeight I need is 3 + 1 = 4,so I want to set pageHeight to 4.
I tried to add logic in Get Tag Event,however,it didn't work.The property enabled of every dataBand always be true.
Maybe there's some way to help me to realize.
Thank you.
now I'm making a template,it has 5 dataBands,each dataBand I leave 1cm,so I set default pageHeight to 6(with top,margin 0.5).
At the same time, I need to add some variables to control some of the dataBand enabled or disabled,so that height of rendered content may less than 5.
For example,if I disabled 2 of them,the content height is 5 - 2 = 3,and pageHeight I need is 3 + 1 = 4,so I want to set pageHeight to 4.
I tried to add logic in Get Tag Event,however,it didn't work.The property enabled of every dataBand always be true.
Maybe there's some way to help me to realize.
Thank you.