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.
Two server JSPs:
Examples:
http://localhost:8888/jinfonet/tryView.jsp?jrs.cmd=jrs.try_vw&jrs.report=%2fSampleReports%2fEmployeeInformation.cls&jrs.catalog=%2fSampleReports%2fSampleReports.cat&jrs.result_type=8
http://localhost:8888/jinfonet/tryView.jsp?jrs.cmd=jrs.try_vw&jrs.report=/SampleReports/ShipmentStatus.wls&jrs.catalog=/SampleReports/SampleReports.cat&jrs.result_type=8
Examples:
http://localhost:8888/jinfonet/runReport.jsp?jrs.cmd=jrs.web_vw&jrs.report=%2fSampleReports%2fEmployeeInformation.cls&jrs.catalog=%2fSampleReports%2fSampleReports.cat&jrs.result_type=8
http://localhost:8888/jinfonet/runReport.jsp?jrs.cmd=jrs.web_vw&jrs.report=%2fSampleReports%2fProducts.wls&jrs.catalog=%2fSampleReports%2fSampleReports.cat&jrs.result_type=2
One DHTML JSP:
http://localhost:8888/dhtmljsp/dhtml.jsp?jrs.catalog=%2fSampleReports%2fSampleReports.cat&jrs.report=%2fSampleReports%2fEmployeeInformation.cls
Tip: When you run a report in DHTML 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
Call the servlet jrserver. For example, run the page report to the DHTML format:
http://localhost:8888/jrserver/SampleReports/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/SampleReports.cat
jrs.report=/SampleReports/EmployeeInformation.cls
DHTML servlet
The DHTML servlet jrdhtml is used to run a page report to the DHTML format specifically, and you needn't specify the format type compared to the server servlet.
Examples:
http://localhost:8888/jrdhtml/SampleReports/SampleReports.cat/EmployeeInformation.cls?
http://localhost:8888/jrdhtml?jrs.catalog=/SampleReports/SampleReports.cat&jrs.report=/SampleReports/EmployeeInformation.cls
Tip: When running reports to the PDF format via URL, you can encrypt the PDF results by using the encrypting PDF properties.
Below are some more specific examples about running reports via URL: