The ASP Report Wizard has the ability to accept parameters at runtime so as
generate time-sensitive or user-based reports.
There are 2 kinds of parameters that can be used:
system parameters and user-defined parameters. You add
these parameters at the filter screen of the dialog wizard.
System Parameters
(screen_shot)
The system parameters are basically some popular information which the report
wizard can get from the system. The report wizard will then replace these
values as shown below:
-
@DATETIME: - the current date & time
-
@DATE: - the current date
-
@TIME: - the current time
-
@YEAR: - current year
-
@MONTH: - the current month
-
@DAY: - the current day
-
@USERNAME: - the value in
Session("UserName")
-
@USERID: - the value in
Session("UserID")
As time goes on we will add more system parameters.
User-Defined Parameters
(screen_shot)
User-Defined parameters are parameters that the current user will be
asked for when they try to view the report.
The report wizard first looks for the paramter's value in the URL query string.
If it does not find it, it will then ask a the current user only once for the
value.
For example:
Consider that your reports are located at the following web address:
http://mycompany.com/reports/default.asp
If you have a report with report id = ORDER
If this report has a user defined parameter called ?ORDERID
You can make a direct link to this report as follows:
http://mycompany.com/reports/default.asp?rid=ORDER&ORDERID=10528
to view the order details for Order 10528
...