Dynamic Paging based on variable

I am a new Jaspersoft Studio user.  I'm stuck trying to solve a problem.

Below is a mockup of a report.  This report will feed a shipping label printer.

All the data stays the same (client name, Order #, Job Name, etc)

The only change is the page count in the bottom right corner.

I need to adjust the page count with a variable.  For example if I change the variable to 10, jaspersoft spits out a 10 page report.  If I change the variable to 3 then jaspersoft spits out a 3 page report.  Etc...

Ive got the form designed.  I now need help to figure out the dynamic paging based on a variable.  The variable I want to use is $V{PagesRequested}

Can a person with more knowledge help me figure this out?

DPANSCIK's picture
Joined: May 21 2019 - 12:51pm
Last seen: 3 months 2 weeks ago

Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times.
 

mrajkuma - 3 months 2 weeks ago

1 Answer:

You can supress the pages based on input parameter or by defining a variable(System)  and go the detail or other display bands and using the print when expression to do this.

$V{PAGE_NUMBER} <= $V{PagesRequested} 

rpachipu's picture
307
Joined: May 25 2023 - 8:28am
Last seen: 2 hours 17 min ago
Feedback