There are two ways you can use to run reports via URLs: JSP and servlet. Detailed JSP and servlet parameters are introduced in Appendix 7: Parameters for running reports via URL.
All the JSP and servlet methods introduced below are applicable to page reports. For web reports, only the server JSP and Servlet methods are applicable, while only tryView.jsp can be used to run web reports in Web Report Studio and the other methods can only be used to run web reports to other formats other than to Web Report Studio.
Two server JSPs:
The tryView.jsp can be used to run page reports and web reports to any allowed formats.
Examples:
http://localhost:8888/jinfonet/tryView.jsp?jrs.cmd=jrs.try_vw&jrs.report=%2fEmployeeInformation.cls&jrs.catalog=%2fSampleReports.cat&jrs.result_type=8
http://localhost:8888/jinfonet/tryView.jsp?jrs.cmd=jrs.try_vw&jrs.report=/Link.wls&jrs.catalog=/SampleReports.cat&jrs.result_type=8
The runReport.jsp can be used to run page reports to any allowed formats and run web reports to formats other than in Web Report Studio.
Examples:
http://localhost:8888/jinfonet/runReport.jsp?jrs.cmd=jrs.web_vw&jrs.report=%2fEmployeeInformation.cls&jrs.catalog=%2fSampleReports.cat&jrs.result_type=8
http://localhost:8888/jinfonet/runReport.jsp?jrs.cmd=jrs.web_vw&jrs.report=%2fProducts.wls&jrs.catalog=%2fSampleReports.cat&jrs.result_type=2
One Page Report Studio JSP:
http://localhost:8888/dhtmljsp/dhtml.jsp?jrs.catalog=%2fSampleReports.cat&jrs.report=%2fEmployeeInformation.cls
Tip: When you run a report in Page Report Studio using URL, if you want JReport to automatically refresh the report data at certain intervals, you can set the URL as follows:
http://localhost:8888/dhtmljsp/dhtml.jsp?jrs.report=/USERFOLDERPATH/admin/AutoRefresh/autorefresh.cls&jrs.catalog=/USERFOLDERPATH/admin/AutoRefresh/testauto.cat&jrs.auto_refresh_data=true&jrs.auto_refresh_data_time=10
The image below illustrates the relationship between these JSPs:
Server servlet
The server servlet can be used to run page reports to any allowed formats and run web reports to formats other than in Web Report Studio.
Call the servlet jrserver. For example, run the page report in Page Report Studio:
http://localhost:8888/jrserver/SampleReports.cat/EmployeeInformation.cls?jrs.cmd=jrs.web_vw&jrs.result_type=8
This request will be redirected to /dhtmljsp/dhtml.jsp with the following parameters:
jrs.catalog=/SampleReports.cat
jrs.report=/EmployeeInformation.cls
Run a web report to HTML:
http://localhost:8888/jrserver/SampleReports.cat/Link.wls?jrs.cmd=jrs.web_vw&jrs.result_type=1
Page Report Studio servlet
The Page Report Studio servlet jrdhtml is used to run a page report in Page Report Studio specifically, and you needn't to specify the format type compared to the server servlet.
Examples:
http://localhost:8888/jrdhtml/SampleReports.cat/EmployeeInformation.cls?
http://localhost:8888/jrdhtml?jrs.catalog=/SampleReports.cat&jrs.report=/EmployeeInformation.cls
Tip: When running reports to the PDF format via URL, you can encrypt the PDF result by using the encrypting PDF properties.
Below are some more specific examples about running reports via URL: