JSON as the Remote Data Source
I would like to share with the community 2 samples of the reports that utilize JSON as the Remote Data Source.
Test report 1:
Remote JSON data source with Data Adapter approach:
Two properties should be defined in the report.
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="JSON_TEST_DA"/> <property name="net.sf.jasperreports.data.adapter" value="JSON_TEST_DA.xml"/>
- Corresponding data adapter should be present in JasperReports Server.
I have attached the exported copy of this sample to the article: case_57317.zip
If you import it to JasperReports Server it should be unpacked to the directory
/public/case_57317
Video related to this approach: http://screencast.com/t/X9rFntBGOg
Test report 2:
Please find in the attachment to the article the exported sample of the report that illustrates this approach (Remote_JSON_export.zip)
To test this resource you should:
Import it to JasperReports Server.
Execute a sample of the report, /public/Remote_JSON that uses remote JSON data source.
Regarding the configuration that is used to achieve this:
- Do not link a data source
feature is set for this report in JasperReports Server
In the jrxml report is defined the property that points to the remote JSON data source
net.sf.jasperreports.json.source=http://echo.jsontest.com/key/value/one/two
Recommended Comments