Report Parameters

How to:

Reference:

If the schedule you are creating has parameters, you must specify the parameter values in the Report Parameters window. Each parameter name and description are populated automatically, so you only need to specify the parameter values.

The following image shows an example of the Report Parameters window with a parameter named Store Name and a value of Web Sales.

Run Parameters window


Top of page

x
Procedure: How to Specify Parameter Values

To specify parameter values:

  1. In the Value field, specify the parameter value(s) that correspond to each parameter within the report.

    Note: For more information about specifying parameter values for a procedure, see Considerations When Specifying Parameter Values.

  2. To continue to the Distribution window, click Next. For more information, see Distribution Options in the Scheduling Wizard.

Top of page

x
Reference: Considerations When Specifying Parameter Values

Consider the following when specifying parameter values for a procedure:

Note: You can only schedule saved procedures using ReportCaster. HTML forms cannot be scheduled using ReportCaster. Parameter prompting is not available in pre-processing or post‑processing procedures. For more information about WebFOCUS auto prompting, see Coding a User Interface in the Developing Reporting Applications manual.



Example: Setting a Default Variable Parameter Value

Tip: Since ReportCaster requires considerations for special characters, we recommend using the syntax specified in the following examples.

The following procedure sets a default value of NY for the STATE (2-3 letters for US State) field, and a default value of Web Sales for the SNAME (Store Name) field. Note that there must be an ampersand in front of the field name in the -DEFAULT command for the amper variable(s) to contain a default attribute in ReportCaster.

-DEFAULT &STATE=NY
-DEFAULT &SNAME=Web SalesTABLE FILE CENTORD
SUM QTY_IN_STOCK BY STATE BY SNAME BY PRODNAME
ON TABLE SUBHEAD
"Inventory Report"
WHERE STATE EQ '&STATE.2-3 letters for US State.'
WHERE SNAME EQ '&SNAME.Store Name.'
END

The following image shows the parameters for this procedure in the Report Parameters window. Note that a default parameter value of NY is displayed for the STATE field, and a default parameter value of Web Sales is displayed for the SNAME field:

Report Parameters window



Example: Adding a Static Single-Select List of Parameter Values

The following procedure provides a list of static values that are valid for the SNAME (Store Name) field.

-DEFAULT &STATE=NY
TABLE FILE CENTORD
SUM QTY_IN_STOCK BY STATE BY SNAME BY PRODNAME
ON TABLE SUBHEAD
"Inventory Report"
WHERE STATE EQ '&STATE.2-3 letters for US State.'
WHERE SNAME EQ '&SNAME.(eMart,TV City,Web Sales).Store Name.'
END

The following image shows the parameter values for the Store Name parameter as they appear in the Report Parameters window. You can select only one value from the Value drop‑down list.

Report Parameters window



Example: Adding a Dynamic Single-Select List of Parameter Values

The following procedure provides a list of values that are valid for the PRODNAME (Product Name) field. This list is dynamically populated with values from the CENTORD data source.

-DEFAULT &STATE=NY
TABLE FILE CENTORD
SUM QTY_IN_STOCK BY STATE BY SNAME BY PRODNAME
ON TABLE SUBHEAD
"Inventory Report"
WHERE STATE EQ '&STATE.2-3 letters for US State.'
WHERE SNAME EQ '&SNAME.(eMart,TV City,Web Sales).Store Name.'
WHERE PRODNAME EQ '&PRODNAME.(FIND PRODNAME IN CENTORD).Product Name.'
END

The following image shows parameter values for the Product Name parameter as they appear in the Report Parameters window. The Value drop‑down list is dynamically populated using data in the CENTORD data source, and you can select only one value from the list.

Report Parameters window



Example: Adding a Static Multi-Select List of Parameter Values

The following procedure provides a list of static values that are valid for the SNAME (Store Name) field.

-DEFAULT &STATE=NY
TABLE FILE CENTORD
SUM QTY_IN_STOCK BY STATE BY SNAME BY PRODNAME
ON TABLE SUBHEAD
"Inventory Report"
WHERE STATE EQ '&STATE.2-3 letters for US State.'
WHERE SNAME EQ &SNAME.(OR(eMart,TV City,Web Sales)).Store Name.
END

The following image of the Report Parameters window shows the Store Name parameter and its Value drop‑down list with multiple selections.

Report Parameters



Example: Adding a Dynamic Multi-Select List of Parameter Values

The following procedure provides a list of values that are valid for the PRODNAME (Product Name) field. This list is dynamically populated with values from the CENTORD data source.

-DEFAULT &STATE=NY
-DEFAULT &SNAME='TV City' 
-DEFAULT &PRODNAME='''120 VHS-C Camcorder 40 X'''TABLE FILE CENTORD
SUM QTY_IN_STOCK BY STATE BY SNAME BY PRODNAME
ON TABLE SUBHEAD
"Inventory Report"
WHERE STATE EQ '&STATE.2-3 letters for US State.'
WHERE SNAME EQ &SNAME.(OR(eMart,TV City,Web Sales)).Store Name.
WHERE PRODNAME EQ &PRODNAME.(OR(FIND PRODNAME IN CENTORD)).Product Name.
END

The following image shows the parameter values for the Product Name parameter as they appear in the Report Parameters window. You can select multiple values from the list or you can choose No Selection if you do not want to perform any data selection test on that field.

Report Parameters window

Important: When coding a dynamic multi-select list of parameter values using -DEFAULT syntax without storing parameter values in the ReportCaster Repository, use the -DEFAULT value as specified in the procedure. The scheduled request will fail if you do not specify three single quotation marks before and after the parameter value string.


WebFOCUS