Jump to content
Changes to the Jaspersoft community edition download ×

JasperReports Server - Add subreports


magarcia_2

Recommended Posts

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

/reports/JRXMLs/reportHeader.jrxml[/code]

And a subreport in this directory:

/reports/JRXMLs/Subreports/subreport.jrxml[/code]

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

"repo: /reports/JRXMLs/Subreports/subreport.jrxml"[/code]

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

Link to comment
Share on other sites

  • 3 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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:

               "repo:/folder1/folder2/subreportname_files/main_jrxml"

                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!

 

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...