mrc
Documentation
michaels, ross &
cole, ltd.
http://www.mrc-productivity.com/
|
|
|
|
Executing a Java servlet 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 Reports within Web 2.0 Reports.
In
this example, we'll treat it as if you were going to execute a report directly
into .CSV 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=9
where
IPAddress IP
address of the server or qualified server name
DD Data
dictionary in which report resides
RXXXXXs Executable
report program number
? Is
the indicator that there are parameters being passes to the RXXXXXs program
run=1 Indicates
to the program to use the parameters which follow
& 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=2 -- Formatted Excel
outfmt=4 -- XML
outfmt=10 -- Excel
outfmt=11 -- PDF