0
votes

I'm designing barcode labels in Jasper iReport. It's 2 labels next to each other. At the moment I have it like this:

enter image description here

As you can see its the same barcode numbers next to each other. I want it to look like this:

enter image description here

So instead of 2 of the same barcode numbers next to each other I need unique ones right through. Not sure how to tackle this. Can someone help please?

Here is the code I use:

select to_char(pallet_id_no_seq.nextval) as barcode 
from dual 
connect by level <= $p{quantity}

As you see here above the query has a parameter in that I can use to choose how many barcodes I want to print in the Detail Band of Jasper.

1

1 Answers

0
votes

Try it like this:

 SELECT to_char(pallet_id_no_seq.nextval) as barcode 
 FROM (
      SELECT * FROM DUAL
      CONNECT BY LEVEL <= $P{quantity}
  )

In iReport: Right click your report name in Report Inspector and choose Page Format. Change your number of columns to 2 and save. Right click the report again and choose Properties. Here you might need to change the print order to horizontal -- test it and see how that looks.