Jump to content
Changes to the Jaspersoft community edition download ×

JavaCompileManager Oversight?


Recommended Posts

I think this might have been an over sight when creating the JasperCompileManager.


You cannot use the compile manager to compile a report to a JasperReport that has a subreport that is passed in as a parameter. There is no method which accepts java.util.Map with parameters.


In the JasperRunManager, you can pass in a subreport as a parameter, but you cannot compile the jrxml to a JasperReport.


The bottom line of what I'm saying is there is no way to compile a template that a parametertized subreport to a JasperReport.


Am I correct in this and should it be reported as a bug/new feature? Or am I just missing something?


Thanks for your help.



Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic



This is a missunderstanding of how things work.

Any report template (JRXML) can be used as a subreport.

In the majority of use cases, people deal with static report templates and if so the report compilation process should be part of the application build process.

You should compile JRXML files to *.jasper files just like you normally compile *.java files to *.class files.


And for this we have provided an ANT task to bulk compile JRXML files (/demo/samples/antcompile sample provided).


I hope this helps.


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...