How to avoid uplaoding all the subreports of my report to my app?

Hi community!

 

My doubt is based on the necessity of uploading all the .jasper files to my application report's folder when my report have several subreports (using the $P{SUBREPORT_DIR} parameter passed to my main report from java code).

Since now, I just has found this option when googling for an answer to it, but I'm guessing, since I have the xml code, I can "embbed" the code of my subreport inside the main report's xml code. Is it possible? If so, how can I achieve it? It's important to have into consideration that I also have several parameters passed from my main report to my subreports. 

 

Thanks!

lilyrh09's picture
Joined: Sep 7 2016 - 12:28am
Last seen: 6 years 2 weeks ago

2 Answers:

Sorry no. You'll have to create an extension to JasperReports library yourself to do that.

hozawa's picture
170715
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 9 months ago

Hi @hozawa,

 

Thanks for your answer!

I know there is an explantaion behind the subreports feature working this way (reusability and all) but in my case I don't need the subreports to be reusable, so I'm trying to avoid getting my app "dirt" with all those unnecessary .jasper files.

So far I've found the following threads where they say it is actually possible to achieve this, but my question is, how to? 

 

http://community.jaspersoft.com/questions/514525/jasper-report-and-subre...

http://stackoverflow.com/questions/929290/directly-embedded-subreport-in...

 

I tried to do some of the explained here, but without success... Since you said it is not feasible, I'm guessing you won't know how to do it, but I think this is an interesting feature that many would be glad to use and more than that, I'm sure someone had to do it in the past. If not, I'd like to get a solution for the community's sake ;)

 

Let's see if we can (with some help) get to a solution.

 

Greetings!

 

lilyrh09's picture
Joined: Sep 7 2016 - 12:28am
Last seen: 6 years 2 weeks ago
Feedback