Generate list of barcodes from list of numbers - jaspersoft studio - PDF output

Agenda: To print a list of numbers to barcodes horizontally - PDF output format

I have a List of numbers, passing it as a parameter to Jasper report from java (Java 8) code. Designed template (in Jaspersoft studio 6.5.1) with list whose dataset is mapped to the parmeter BarcodesList.

Can anyone guide me how to configure in jaspersoft studio UI tool - list of numbers to be displayed as barcodes.

Sample code:

List<String> barcodes = new ArrayList<String>();
JRBeanCollectionDataSource barcodesJRBean = new JRBeanCollectionDataSource(barcodes);
// create map and add parameters to it
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("BarcodesList", barcodesJRBean);
// pass map to jasper repot
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, new JREmptyDataSource());
// export to PDF

Nothing is printed in PDF output. Please help me to achieve this.

NOTE: Using Intellij, no jasper plugins available.

Thanks in advance.

vaanisai3891's picture
Joined: Feb 4 2018 - 11:39am
Last seen: 5 years 1 month ago

0 Answers:

No answers yet