The query and the design of the report parameters require the user to specify a minimum stock quantity and a specific vendor. The report displays only products with the specified minimum stock quantity and for the selected vendor. In this procedure, you provide the user with the option of selecting all vendors, so that the report displays all products—supplied by any vendor—with the specified minimum quantity. To provide this option, you modify the RP_productvendor report parameter to display an All Vendors value, and to send the appropriate value to the query.
1 In Data Explorer, expand Report Parameters, right-click RP_productvendor, then choose Edit.
2 On Edit Parameter, under List of value, choose Static. This option lets you create user-defined values, whereas the dynamic option does not.The properties under List of Value change to reflect the change from dynamic to static values.
1 Choose Import Values. Import Values displays the first data set in the report, Products, and the values of the first field in the data set, PRODUCTNAME.
2 In Select Data Set, select Vendors.
3 In Select Column, select PRODUCTVENDOR. Import Values displays the values for the field.
4 Choose >> to import all values from the field.Figure 12‑24 shows the selections you make in Import Values.
Figure 12-24 Import Values showing the data set field values to import
5 Choose OK. Edit Parameter displays the imported values in the Selection values table, as shown in Figure 12‑25.
Figure 12-25 Edit Parameter displaying the values that appear in the list box
1 In Display Text, type the following text:
2 In Value, type the following character:
Figure 12-26 In SQL, % is a wildcard character that matches any sequence of characters. When the user selects All Vendors, the WHERE clause in the Products query is updated as:On Edit Parameter, the new value appears at the bottom of the Selection values table.
1 Under Sort, in Sort by, select Value Column. This sort displays All Vendors at the top of the list in the list box because the value % appears before A.
1 Choose Preview. Enter Parameters appears, as shown in Figure 12‑27. All Vendors is the first value in the list, and this value is selected by default.
Figure 12-27 Enter Parameters displaying the updated vendor parameter
o For the first parameter, type the following number:The generated report should look like the one shown in Figure 12‑28. The report displays products, supplied by any vendor, where the quantity in stock is less than or equal to 500.
Figure 12-28 Report displays rows that match the specified report parameter values
(c) Copyright Actuate Corporation 2008 |