A JasperReport is a complex resource that contains many parts such as a data source, input controls, and file resources. These can be either references to other resources in the repository or resources that are fully defined internally to the report.
In the following example, a simple request gives the contents of a JasperReport:
GET http://localhost:8080/jasperserver/rest/resource/reports/samples/AllAccounts
The following response in this example shows the content of the AllAccounts report:
• | The reportUnit, which is the container for all the resources of the report. |
• | The data source, which is an external link to a data source in the repository. |
• | The main JRXML, which is a file defined internally to this resource. |
• | Two image files, one of which is defined internally to this resource, the other references a file resource in the repository. |
The structure of the JasperReport is defined through nested resourceDescriptor tags in XML. In the nested descriptor for each file that is part of the JasperReport, we can find its URI and use fileData=true to retrieve that file:
Recommended Comments
There are no comments to display.