BackPrevious Page Next PageNext

Opening Web Reports in Web Report Studio via JSON

JReport provides properties for developer users to run web reports in Web Report Studio via JSON (JavaScript Object Notation).

The following lists the properties that are encapsulated as JSON objects. It will help if you obtain some knowledge on JSON to understand the syntax more clearly.

When composing the URL, you need to use URL encoding to avoid errors.

Here is an example of the complete URL without URL encoding to make it easier to read:

http://localhost:8888/webreport/studio/entry/run.jsp?jrd_report={"name":"/SampleReports/report.wls","ver":"-1"}&jrd_catalog={"name":"/SampleReports/SampleReports.cat","ver":"-1"}&jrd_param$={"P_Coutry":"USA"}&jrd_security_file_name={"name":"SampleReports.security.xml"}&jrd_datasources=[{"ds":"Data Source 1","uid":"xxx","pwd":"xxx","type":"0","url":"xxx","driver":"xxx"},{"ds":"Data Source 2","type":"2","key":"xxx"}]

If you use absolute resource path, you need to add the property "real":"true" for the path. For example,

jrd_report={"name":"C:\\JReport\\Server\\jreports\\SampleReports\\Sales Detail Report.wls","real":"true"}&jrd_catalog={"name":"C:\\JReport\\Server\\jreports\\SampleReports\\SampleReports.cat","real":"true"}

Run Sales Detail Report.wls in the Public Reports > SampleReports folder:

http://localhost:8888/webreport/studio/entry/run.jsp?jrd_report={"name":"/SampleReports/Sales Detail Report.wls"}&jrd_catalog={"name":"/SampleReports/SampleReports.cat"}

BackPrevious Page Next PageNext