You can add dynamic interactivity to a published report such that when you execute or view it, you can specify how to constrain certain parts
of the query data. This is called parameterization. This procedure requires a JDBC data source type.
Note: You can only
use this procedure to parameterize data returned by a query. You cannot use a WHERE statement to dynamically choose columns or change the structure of tabular
data. If you need to go beyond the capabilities of the method explained in this section, see Advanced SQL output parameterization to create a custom formula instead.
Perform the following steps to parameterize a report by adding an SQL WHERE statement to your query.
When you run this report, you are presented with an interactive field that specifies an adjustable constraint for the column you specified.
In the example below, the constraint would be a specific product line from the PRODUCTLINE column of the
PRODUCTS
table.
SELECT PRODUCTLINE, PRODUCTVENDOR, PRODUCTCODE, PRODUCTNAME, PRODUCTSCALE, PRODUCTDESCRIPTION, QUANTITYINSTOCK, BUYPRICE, MSRP FROM PRODUCTS WHERE PRODUCTLINE = ${ENTER_PRODUCTLINE} ORDER BY PRODUCTLINE ASC, PRODUCTVENDOR ASC, PRODUCTCODE ASC