[#14201] - Resource not found at: <nested sub report name>

Category:
Bug report
Priority:
Normal
Status:
Closed
Project: Severity:
Block
Resolution:
No Change Required
Component: Reproducibility:
N/A
Assigned to:

Hi,
here's my problem.
I'm developping a complex report using JasperStudio 6.14.0 and resulting report have to be deployed in external server, out of my control.
I decomposed report in several subreports, some of wich have subreports inside.
In preview mode I got this error :

net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Resource not found at: proprietespartieequipement_1.jasper.

As you can guess, proprietespartieequipement_1.jasper is the nested subreport. Structure looks like this :
Main.jrxml
---> ProprietesPartieEquipement.jrxml
------>proprietespartieequipement_1.jrxml
------>proprietespartieequipement_2.jrxml

I tried a workaround :
I created a parameter SUBREPORT_DIRECTORY in Main.jrxml and I passed it to its subreport ProprietesPartieEquipement.jrxml

In ProprietesPartieEquipement.jrxml I prefixed its subreports expression with $P{SUBREPORT_DIRECTORY} :
$P{SUBREPORT_DIRECTORY} + "proprietespartieequipement_1.jasper"

In Main I manually filled parameter SUBREPORT_DIRECTORY with the local path of project files and all works well.

My problem is that this report is not portable to target external system, because it does not have the same path structure.
So I'd like to programatically fill this parameter in order to allow it to have the right value inside, whatever system running it.

Is this solution possible, or anoher one ?

Thank you

v6.14.0
info_itxpert720's picture
Joined: May 13 2022 - 7:33am
Last seen: 6 months 2 hours ago

3 Comments:

#1
  • Severity:Minor» Block
#2
  • Status:New» Feedback Requested

Hi there were some improvements related to the sub-reports compilation area.
See for example the following two entries already closed:
- https://community.jaspersoft.com/jaspersoft-studio/issues/13226
- https://community.jaspersoft.com/jaspersoft-studio/issues/13646

Please give it a try to your scenario with one of the latest releases. Since you mentioned version 6.14.0 I suppose you did not try the latest 6.19.1.

Best regards,
Massimo.

#3
  • Resolution:Open» No Change Required
  • Status:Feedback Requested» Closed

Cleaning up tracker.
As reported in my last comment the problem with subreports compilation was already addressed hence closing it.

Regards,
Massimo.

Feedback