Jump to content
  • Minimal JasperReport maven module for export operations


    bond570
    Assigned User teodord
    CategoryFeature request
    PriorityNormal
    ReproducibilityN/A
    ResolutionSuspended
    SeverityFeature
    StatusResolved

    Hi,

    I am currently working on a project where jasper print report generation is divided in two applications A and B built with Maven.

    These applications communicate between them.

    When a report is requested, application A fills a report and export it to a JasperPrint java object.

    Then, the JasperPrint object is sent to application B through a WebService.

    Finally, application B exports the JasperPrint object to a desired output type (HTML,PDF,EXCEL,...).

    In fact, application A needs almost all transitive dependencies coming from artifact "net.sf.jasperreports:jasperreports".

    On the contrary, and based on my tests, application B only needs the following artifacts:

     

    • commons-logging:commons-logging
    • commons-collections:commons-collections
    • commons-digester:commons-digester
    • commons-beanutils:commons-beanutils
    • net.sf.jasperreports:jasperreports

    Application B has to be as light as possible because it is dowloaded and runned by the client side. I manually excluded useless artifacts from Maven build, but I'd rather use a stable build for futur jasperreports versions.

    So, can you please provide a light JasperReports Maven module that only allows to perform export operations (the report being already filled)?

    Regards.



    User Feedback

    Recommended Comments

    Changed Status from New to Feedback Requested

    Changed Assigned User from - to @teodord


    Hi,This is not as simple as it sounds. The B application needs dependencies as well, if you want to export to PDF, Excel, etc. For PDF you would need iText and its dependencies. For Excel, you would need POI or JExcelApi, in case you don't go with our XLSX exporter.Things get more complicated when reports contain custom components or generic elements, for which we need export handler implementations at export time.So I don't see the export as lightweight. Sometimes it can get pretty heavey and I would encourage you do not do much in application B. I would do everything in application A and only send over the exported document just for display or storage. This way the B would be very lightweight as it would not have any knowledge of JR whatsoever. Just PDF, Excel , HTML files manipulations.I hope this helps.Teodor
    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...