JasperReports Server - Add subreports

I have the following problem.
I have a report in this directory:


And a subreport in this directory:


In the main report I call the sub-account as:

"repo: /reports/JRXMLs/Subreports/subreport.jrxml"

But when I run the report it does not work. Nor is there any error.

Also try to add subreport that has been uploaded on the previous step
in the Controls and Resources tab of the Main report. But it does not work.

Any idea what I'm doing wrong?

Thank you very much

magarcia_2's picture
Joined: Sep 4 2017 - 7:21am
Last seen: 2 years 3 weeks ago

1 Answer:

1. Publish main report and subreports in jasperServer

2. JasperStudio - open main report - from palette add subreport - select a report file (dialog box)  - select custom expression as:


                where folder1 and folder2 are directories previously created on your jasperreports server.

3.  JasperStudio - Click subreport from main report - properties - subreport option . Where:

        - expression should be the same you added in step 2

        - Connection expression should be $P{REPORT_CONNECTION}

This is the way i use subreports and it works, at least with version 6.4. You can also try specifying in step 2 the option "select a resource from jasperReports server.

Hope this helps!


Peñarandix85's picture
Joined: Mar 1 2017 - 4:58am
Last seen: 5 years 6 days ago