Working with reports via URL

Besides working on interfaces, most of the Page Report Studio operations such as filter, sort, search, save and so on, can also be accomplished via URL. When using URLs to access Page Report Studio, you should follow the specifications described in this section.

The URL in Page Report Studio is:

http://localhost:8888/dhtml?sessionid=XXXXXXX&rptsetid=XXXXXXX&rptname=XXXXXXX&op=...

There are some methods in the file API.js located in <intall_root>\public_html\javascript\dhtml. These methods are the tools you can use to generate URLs. The result of each of these functions will be a URL.

Parameter Description Key Value
Download Report
Operation code op 51
Export report type ty 2 for PDF, 3 for PostScript, 4 for RTF, 5 for Text, 6 for Excel, and 7 for XML.
Example op=51&ty=2
Note
  • The order begins with 2.
  • A file of HTML type cannot be downloaded.
Prototype function user_downloadReport(type)
Exit
Prototype function user_exit (popwin)
Navigate Page
Operation code op 24
Page number pn 1...n
Example op=24&pn=2
Note The page number begins with 1 and is less than total page number.
Prototype function user_firstPage()
function user_lastPage()
function user_nextPage()
function user_prevPage()
One Step Filter
Operation code op 25
The column name col Mapping the name of a column in JReport.
Operator of filter condition operator eq (equal to), gt (greater than or equal to), geq (greater than), lt (less than), leq (less than or equal to), neq (unequal to)
The column value value
Logic of filter condition logic AND, OR, END
Instance name of the column comp component instance name
Example op=25&col=CusID&operator=eq&value=1&logic=OR&col=CusName&operator=0&value=ZhangKe&logic=2&comp=convert_sectionObject
Note The value is case-sensitive.
Prototype function user_oneStepfilter(columns, operators, values, logics, instanceName)
One Step Search
Operation code op 128
The column name column Mapping the name of a column in JReport.
The column value value the value to search for
Whether or not to search content only isContent true/false
Whether or not to match case isMatchCase true/false
The search direction isUp true/false
Whether or not to match whole word isWholeWord true/false
Example op=128&column=CusID&value=1&isContent=true&isMatchCase=false&isUp=false&isWholeWord=false
Prototype function user_oneStepSearch(value, isContent, colName, isUp, matchcase, isWholeWord)
One Step Sort
Operation code op 12
The column name col Mapping the name of a column in JReport.
The column sort order ord true/false
Instance name of the column comp component instance name
Example op=12&col=CusID&ord=true&col=CusName&ord=false&comp=convert_sectionObject
Note The value is case-sensitive.
Prototype function user_oneStepSort(columns, sorts, instanceName)
Open Report
JSP page /dhtmljsp/dhtml.jsp
Action jrs.cmd jrs.try_vw
Report name jrs.report path/name
Catalog path jrs.catalog
Result type jrs.result_type int
Example

http://localhost:8888/dhtmljsp/dhtml.jsp?jrs.report=%2fEmployeeInformation.cls
=&jrs.cmdjrs.try_vw&jrs.catalog=%2fSampleReports.cat

Note
  • The path delimiter is "/". If you encounter problems, you can replace it with "%2f".
  • The version number can be none, as with the example.
Open RSD File
JSP page /dhtmljsp/dhtml.jsp
Result path jrs.path path/name
Result name jrs.result path/name
Result version number jrs.rst_version int
Example http://localhost:8888/dhtmljsp/dhtml.jsp?jrs.resource_path=/USERFOLDERPATH/admin/test&jrs.file=1980996366.rsd
Note
  • The path delimiter is "/". If you encounter problems, you can replace it with "%2f".
  • The version number cannot be none.
Redo
Operation code op 85
Example op=85
Prototype function user_redo()
Refresh
Operation code op 83
Example op=83
Prototype function user_refresh()
Reset
Operation code op 76
Example op=76
Prototype function user_reset()
Save Report
Operation code op 82
Example op=82
Prototype function user_saveRpt()
Search Next
Operation code op 34
Example op=34
Show Export to Dialog
Prototype function user_showSaveResultDialog()
Show Help
Dialog ID HELP_OP 182
Example http://localhost:8888/dhtmljsp/help.jsp?sessionid=XXXXXXX&rptsetid=XXXXXXX&rptname=XXXXXXX&HELP_OP=XXX
Note The URL gets the body of a window, you should put it as xxx in window.open("xxx", ..)
Prototype function user_showHelp(helpId)
Show Panel or Dialog
Prototype function user_showUserPanel()
function user_showTOC()
function user_showDHTMLView()
function user_showToolbox()
function user_showSortDialog()
function user_showFilterDialog()
function user_showNewRptDialog()
function user_showOpenRptDialog()
function user_showSaveAsDialog()
function user_showPageSetupDialog()
function user_showSaveResultDialog()
function user_showPageSetupDialog()
function user_showPrintDialog()
Undo
Operation code op 84
Example op=84
Prototype function user_undo()
Zoom
Operation code op 50
Proportion val 0~400
Example op=50&val=250
Note val must be an integer between 0 and 400
Prototype function user_zoom(value)