|
|
|||||||||
Home > Java Barcode Generator > Java Barcode Generation Guide > Java Barcode Generator for Eclipse BIRT How to Insert Barcode Images into BIRT using Barcode for Java?Java Barcode Generator
Quick Navigate
FIRST Commercial Java Barcode Library Supports Eclipse BIRT
If developer can find any problem with previous version of BIRT, please send email to support@barcodelib.com.
Here is the sample source code.
// get engine from Birt Bootstrapping... // ... reportDesign = engine.openReportDesign("C://foo.rptdesign"); //create task to run and render report IRunAndRenderTask task = engine.createRunAndRenderTask(reportDesign); //set options PDFRenderOption options = new PDFRenderOption(); options.setOutputFileName("foo.pdf"); options.setOutputFormat("pdf"); task.setRenderOption(options); // barcode is a com.barcodelib.barcode.Linear object byte[] bytes = barcode.renderBarcodeToBytes(); task.getAppContext().put("imageBarcode", bytes); //run and render report task.run(); task.close(); So this was a simple Main Class using a Birt Engine to dynamicly put a byte[] to a report Context and run the report. Now do the following in the Report Designer:
Thats all. If everything works fine, the dialogs should look like below. When you now run your report the barcode should be visible where you placed the image container.
Back to Barcode for Java | ||||||||||