Jump to content
We've recently updated our Privacy Statement, available here ×

tommy1606

Members
  • Posts

    5
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Posts posted by tommy1606

  1. Hello,

    i am setting properties for elements in ireport. For example on a textfield.

    In java the textfield is represented by a JRTemplatePrintText object.

    I was unable to get the properties here until i found this

    solution 1

    solution 2

    So adding a property net.sf.jasperreports.export.size to textfield allows me to get this properties in java on JRTemplatePrintText.

    But adding the same property to a barcode (barcode4j) results in a JRTemplatePrintImage object and no properties are available.

    Is this a bug or what i am missing?

  2. Hello,

    i am currently writing a custom report exporter.

    My report contains lines, text, rectangle and a barcode.

    For the custom reporter i am extending JRAbstractExporter and implementing exportReport() method.

    Iterating over jasperPrint.getPages() and for every page iterating over jrPrintPage.getElements.
    Elements are for example JRTemplatePrintLine, JRTemplatePrintText, JRTemplatePrintRectangle and so on....
    So far so good..

    But the barcode element is an JRTemplatePrintImage... i guess because exporters like pdf exporter outputs svg images.
    But for my custom exporter i have to output something like

    BARCODE
    C128B;DARK;40;15
    *barcode value*
    STOP

    and not a svg image!

    BUT I SEE NO WAY HOW TO GET THE C128B INFORMATION FROM JRTemplatePrintImage!

    In the jasperDesign oder jasperReport object, the barcode is represented by net.sf.jasperreports.components.barcode4j.Code128Component class. In the jasperPrint object by JRTemplatePrintImage.
    I didn't find anything like JRTemplatePrintImage.getBarcodeComponent().getBarcodeType()...

    I even didn't find a way to get the text under the barcode and the text in the barcode from JRTemplatePrintImage.
     

    But without barcode export possibility i can trash my exporter...
    Any hint for me?

    Kind regards
     

     

×
×
  • Create New...