Jump to content
Changes to the Jaspersoft community edition download ×

Jasper report and subreports in single file


mcauleyt

Recommended Posts

Hi,

 

This seems to have been discussed before but I thought I'd ask the question once more and see if there are any updates?

 

Is it possible to combine a jasper report and its sub-reports into a single .jrxml file? The reason I want to do this is that we do not retrieve the jasper report from the file system but pass it into the JasperReports code as an inputstream.

 

One post by Peter Henderson describes combining the compiled subreports (.jasper files) into one large byte[]. This could be a possibility for us but seems extremely hacky. I would have though Japser should be able to handle embedded subreports in the XML file that contain the full report, not just a link to the next jrxml file.

 

Any thoughts are very welcome.

 

Many thanks,

 

Tim

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

 

we also don't work with filesystem but instead within JBoss... As I use many many SubReports I created so called "PrintTemplateSets" such a set always contains one master and many subreports...

this structure is stored in Database. (the design and also the compiles object, to not compile the design everytime when used).... When printing I just load the whole set from database and but it into a so called "DataContainer".... the subreport expressions in MasterReport are something like

Code:
$P{DataContainer}.getSubReportByName("NameOfTheNeededSubReport"«»)

 

works fine since about two years (and hopefully many years yet).....

 

So I don't see the need of your featureRequest. Jasper is so flexible... you only have to be creative! :-)

 

just my two cents!

hth

C-Box

Link to comment
Share on other sites

Well, in my project i'm using a hibernate API, and when i wants to generati a multiple subReport, i'm only throwing the property.util as the container of the details one. Its absolutely tricky one. But in fact, when i generating it, it is completely slower than other techniques. :blink:
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...