I'm using JasperSoft Studio to create a gift card with a barcode. These gift cards do not use any information from a database. They only value that changes is the barcode, which is incremented with a variable. All this is setup and it works.
What I can't figure out how to do is specify the number of gift cards I want to generate. For example, I'd like to print out 100 gift cards. So, the report should generate 100 pages each with an incrementing barcode. I figured I could use a parameter that gives me a prompt when I go to preview, but I don't know how to use that parameter to actually tell Jaspersoft how many pages I want.
For anyone interested, I came up with a solution to this. Here is the JRXML. There is a prompt that asks how many labels you want and the starting point for the barcode id.
One thing to note is the query:
SELECT * FROM dbo.RowGenerator rg WHERE rg.row_num <= $P{HowMany}
This is assuming a Sybase database, so it may not necessarily work on different DBMS's. What this query does it build a resultset of rows with rg.row_num being an incrementing id for each row. For whatever DBMS you use, this will need to be reproduced.