Jump to content
  • Barcode4j barcode size issue since update 6.0.2


    davidgarratt
    Assigned User teodord
    CategoryBug report
    Component: 14526
    PriorityUrgent
    ReproducibilityAlways
    ResolutionNo Change Required
    SeverityBlock
    StatusResolved
    Versionv6.0.2

    A description including images illustrating the problem have been posted here http://community.jaspersoft.com/questions/851263/jasperreports-603-broken-report

     

    Looking at the source for JasperReports library 6.0.2 and comparing with 6.0.0 there seems to be some new code/classes related to the Barcode4j library. When update the .jar files used by my application http://www.commander4j.com and re-run the application the output shows that the size of the barcode generated is incorrect. I am not sure if this is due to some issue with stretch properties or the new library non picking up the barcode4j xml formatting file.

     

    I have attached a PDF containing the contents of the url at the top of this post in case it is subsequently moved.

     

    This problem has forced me to revert back to 6.0.0 and I cannot update until a workaround/fix is available. I have not been able to find any documentation on the properties of the Barcode4j integration to the JasperReports plugin to Eclipse Luna.

     

    This application runs on any platform with Java 1.7 and was demonstrated to have a problem with a mysql database, although the problem is not database specific.

     

    Dave


    Attachments: document1.pdf

    User Feedback

    Recommended Comments

    Changed Status from New to Assigned

    Changed Assigned User from - to @teodord


    Hi,Not sure what this application you are using is, but can you attach some JRXML file that would help reproduce the problem on our side?Thanks,Teodor
    Link to comment
    Share on other sites

    Changed Status from New to Assigned

    Changed Assigned User from @anonymous to @teodord


    Hi,I took your JRXML, changed the report name inside to match and put it in place of the /demo/samples/barcode4j/reports/Barcode4JReport.jrxml file of the JR 6.0.3 source distribution. After running the sample, I obtained the attached PDF, which seems OK to me.Doing the same on the JR 6.0.3 distro, do you get a different looking PDF?Thanks,Teodor
    Link to comment
    Share on other sites

    I have uploaded example3 image which shows the report running on my Mac using 6.0.0 and 6.0.3 respectively.

     

    I am using OS X Yosemite 10.10.2 with Java 1.7.0_75

    Link to comment
    Share on other sites

    I am running the example report from within my application using the downloaded JasperReports Library. I am wondering if you are running from within the IDE using the design tool and seeing different results because of that ?

     

    Just thinking out loud.

    Link to comment
    Share on other sites

    What would be useful in a situation like this is a minimal application (jar) which could take the name or a report as a parameter and run it with output to screen JRViewer etc. This would work for reports that don't need a data source (jdbc) connection and would mean that we could eliminate any problems with the calling application or other jars on the class path.

     

    Does any such utility exist in your test/dev library ?

     

    Thanks

     

    Dave

    Link to comment
    Share on other sites

    Changed Assigned User from @teodord to -


    Hi,This is what I have told you in my last comment. The simple application you are referring to exists in the form of a sample inside the JR Library source distribution that you can download from Sourceforge.net. If you have ANT Tool installed, you can run those samples and view the simple report in JR's Swing viewer, without interference from other dependencies.Thanks,Teodor
    Link to comment
    Share on other sites

    Hi,

     

    Open a command prompt, cd to the /demo/samples/barcode4j folder and type:

     

    ant clean test view

     

    If you have ANT Tool propertly installed, the small sample application will be run to compile, fill, export and view a report with barcodes in it.

    If all goes well, then take your JRXML, change its file name to match the one in /demo/samples/barcode4j/reports/Barcode4jReport.jrxml, and copy on top of it.

    Also make sure to manually edit your JRXML so that you also change the report name attribute inside to name="Barcode4JReport".

     

    Then run the sample again and see if your barcodes look OK in the Swing viewer which appears.

     

    I hope this helps.

    Teodor

     

    Link to comment
    Share on other sites

    I have attached my sample report.

     

    What I eventually did was remove all barcodes except for the EAN-128 from the sample report, then add my code for my problem barcode into it and ran the report. Initially I notices that on preview my barcode was narrow as reported and your sample barcode was ok. So I then started changing mine small part at a time until it worked. The key setting which fixed it for me was moduleWidth="1.4" which was not present in my report.

     

    I now works. However I still have some differences between the 2 definitions and I was wondering if you could explain the significance of then.

     

    For example mine has jr:EAN128 where your sample uses c:EAN128 - is this just cosmetic namespace ?

     

    Your report has style="Barcode" where mine did not.

     

    If you could clarify this would be most helpful as there does seem very little information on the barcode elements of jasper reports. None that I've found so far.

     

    Thanks

     

    Dave

     

    Link to comment
    Share on other sites

    It would appear that the syntax of the source has changed quite a bit. Loading and re-saving the source + recompiling using 6.04 of the Eclipse plugin resolved the problem.
    Link to comment
    Share on other sites



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...