Opening web reports in Web Report Studio via JSON

JReport provides parameters for developer users to run web reports in Web Report Studio via URL. All the parameters are encapsulated as JSON (JavaScript Object Notation) objects. Therefore, 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.

The following lists the parameters for running web reports via a URL:

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_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\\Products.wls","real":"true"}&jrd_catalog={"name":"C:\\JReport\\Server\\jreports\\SampleReports\\SampleReports.cat","real":"true"}

Run Products.wls in the Public Reports > SampleReports folder:

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