JasperReports in CUBA #124

Is it possible we can use jasperreport in CUBA?

1 Like

I’m pretty sure you can. The question is how do you want to display the reports? if it’s html, you can always use the Embedded option.

For now you have the followng options

  1. Imlement report generation logic manually, with custom report class
  2. Implement your own formatter (which uses jrxml as template), extend CubaFormatterFactory and register it in you spring.xml. In this case you don’t need to create custom report class for each report.
<bean id="reporting_lib_FormatterFactory"  
        <property name="useOfficeForDocxPdfConversion" value="${cuba.reporting.openoffice.docx.useOfficeForPdfConversion?:false}"></property>  
        <property name="officeIntegration" ref="reporting_lib_OfficeIntegration"></property>  
        <property name="defaultFormatProvider" ref="reporting_lib_CubaFieldFormatProvider"></property>  

Also, I can say that we have plans to implement JasperReports formatter in YARG (basis of our reporting), but I’m not sure when it will be done.

Can you give an idea about your planning when you will release the first version with Jasperreports?

I’m not completely sure, but it might be added in the release 6.1 (planned to March).

sounds very good. I’m eager to use that new version, expecting some exciting integration options are coming like CUBA platform that I like very much…

I didn’t see anything mentioned in version 6.1 unless I have missed it. If anyone can provide some update in Jasperreport integration that will be appreciated.

1 Like

where can I get further reading material in order to use jasperreport in my project?

I’m trying to create Reports(Jasper) in a service. But when trying to add the Jasper dependencies, I’m getting this error:
“Could not find com.lowagie:itext:2.1.7.js5. Searched in the following locations: https://repo.cuba-platform.com/content/groups/work/com/lowagie/itext/2.1.7.js5/itext-2.1.7.js5.pom https://repo.cuba-platform.com/content/groups/work/com/lowagie/itext/2.1.7.js5/itext-2.1.7.js5.jar Required by: com.bluemountaindev.iglesiadigital:app-web:0.1-SNAPSHOT > net.sf.jasperreports:jasperreports:6.3.0”

Is the only way to make reports having to use Yarg?


I have tried to add a dependency on Jasperreports 6.3.0 in my project and build failed with the similar error (see attached screenshot).
The problem is: that Jasperreports 6.3.0 has dependencies on itext 2.1.7 and olap4j, and they could not be resolved for some reason.

I have searched itext and olap4j in maven and manually added the corresponding dependencies to the project.
After that actions, the ‘Gradle build’ succeeds.

dependencies {

    compile group: 'org.olap4j', name: 'olap4j', version: '1.2.0'
    compile group: 'com.lowagie', name: 'itext', version: '2.1.7'
    compile group: 'net.sf.jasperreports', name: 'jasperreports', version: '6.3.0'


Hi Rostislav
If you please share the test project that you might have used to test jasperreports that will be appreciated.

Unfortunately, we don’t have any certain plans for integrating JasperReports at the moment. But we are going to improve the documentation soon - it will contain a section about running custom reports not based on YARG.

I am also very keen to know if Cuba will have JasperReports integrated within the framework.
Is this the direction to use JasperReports or will Cuba platform / Studio stick with YARG ?
If you are planning to move to JasperReports, when is the planned target rollout ? I see that the above post was posted 8 months ago now.
For us we don’t mind using a tool like iReports as long as it can create all the different types of reports that we need for an Enterprise application and it can both layout the report and do the SQL together.

:ticket: See the following issue in our bug tracker:


Adding Project repositories https://repo.maven.apache.org/maven2 and Core module dependencies jasperreports, itext & olap4j. Solves the problem :slight_smile: