Jasper report and subreports in single file

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
mcauleyt's picture
Joined: Nov 28 2006 - 8:04pm
Last seen: 16 years 6 months ago

4 Answers:

There is a feature request to implement this feature, but it is still a feature request only.
rsilver@ns.sympatico.ca's picture
Joined: Aug 4 2006 - 3:46am
Last seen: 16 years 10 months ago
Thanks for that reply. I guessed as much but it's nice to get clarification.

Will have to work with a workaround for the time being.

Thanks,

Tim
mcauleyt's picture
Joined: Nov 28 2006 - 8:04pm
Last seen: 16 years 6 months ago
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"«»)</td></tr></tbody></table><br />
<br />
works fine since about two years (and hopefully many years yet).....<br />
<br />
So I don't see the need of your featureRequest. Jasper is so flexible... you only have to be creative! :-)<br />
<br />
just my two cents!<br />
hth<br />
C-Box
C-Box's picture
20525
Joined: Jul 19 2006 - 5:58pm
Last seen: 5 months 1 week ago
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:
jfroozen's picture
Joined: Nov 27 2006 - 11:55am
Last seen: 16 years 6 months ago
Feedback