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

Compiling subreports from java


numeron

Recommended Posts

I have a standalone application, and one of its duties is to take the path of a jrxml file and compile it.

I can do this without problem until a report with a subreport comes up, where the compilation of the master does not compile any of its children, resulting in a subreport *.jasper file not found later down the track.

Is there any way to

1) Set the JasperCompileManager to automatically pick up subreports?

2) Get a list of paths to subreports contained within either a JasperDesign or JasperReport object?

I have no direct access to the jrxml files, so modifying the reports to suit the compile method is not an option, nor is applying any standard naming scheme to infer which subreports belong to which reports.

 

There is a similar problem here:

http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=40683

where a JRVisitor is used to produce a list of JRSubreport objects, however there is no explanation of how to use this to get a path to the subreport in order to compile it and recursively look for subreports of subreports, and I cant figure it out.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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