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.
URL Parameters
An example link may look like the following:
DD.RXXXXXs?run=1&R001=100&D_DETAIL=0&S_CUSNO=1&G_TOTAL=1&outfmt=11
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=2 | Indicates the report application to bypass the prompt page and use the default levels of the report. |
run=1 | Indicates the report application to bypass the prompt page and rather than use the default levels, use the following URL parameters to determine which levels to show in the output of the report. |
& | This is a deliminator between parameters being passed. |
D_DETAIL=1 | Specifies to include detail level in the report. Omit to not show detail. |
S_CUSNO=1 | Specifies to include the subtotal by the field CUSNO (customer number) that the report is sequenced by. Omit to not show CUSNO subtotal. |
G_TOTAL=1 | Specifies to include grand total. Omit to not show grand total. |
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)