Executing a Report directly from a link and/or URL

Usually a report is generated by clicking the "Run Report" button. For most customers, most of the time, this method works well. But there are times when you may need to skip the prompt page and proceed directly to the results page. As you may know, you can do this by adding ?run=2 to the URL line. This will cause the page to run with the defaults from the prompt page. However, you may wish to override these defaults for Ad Hoc Reporting.

Options for Ad Hoc Reporting:

· Display or Hide Detail Row
· Display or Hide Sub-total Row(s)
· Display or Hide Grand total Row
· Choose an Output Format
· Pass Record Selection to Report
· Specify Top 10 Style Parameters. Click here to learn more about Top 10 Style Reports.

In this example, we'll treat it as if you were going to execute a report directly into .PDF form, hiding the detail row, displaying sub-total and grand total rows, and passing a value of "100" as the first record selection.

The link to execute the report by passing the parameters will then look something like this:

http://IPAddress/mrcjava/servlet/DD.RXXXXXs?run=1&R001=100&D_DETAIL=0&S_CUSNO=1&G_TOTAL=1&outfmt=11

where

IPAddress — IP address of the server or qualified server name (ex: 192.168.1.100)
DD — Data Dictionary in which report resides
RXXXXXs — Executable report program number
? — This is the indicator that there are parameters being passed to the RXXXXXs program
run=1 — Indicates to the program to bypass the prompt page and default settings, and to instead use the parameters which follow
& — This is a deliminator between parameters being passed
D_DETAIL=1 — Specifies to include detail level in the report
S_CUSNO=1 — Specifies to include the subtotal by the field CUSNO (customer number) that the report is sequenced by
G_TOTAL=1 — Specifies to include grand total in the report
outfmt=11 — Specifies the output format in which the report will be generated, PDF in this case
rptPage=FILE — This option allows you to control Pagename attributes. Learn more about Pagename here.

Output Format List:

outfmt=0 — HTML
outfmt=1 — Print Optimized HTML
outfmt=4 — XML
outfmt=11 — PDF
outfmt=12 — CSV
outfmt=13 — True Excel (.xlsx)
outfmt=14 — Text File (.txt)
outfmt=15 — Optimized Excel (.xlsx)

Created: February 29, 2008 | Modified: June 6, 2017