CHAPTER 6 BUILDING REPORTS
- After you have created the datasets with the previous queries and verified that
they execute properly via Query in the Report Data window, expand the
Parameters folder. Right-click the BranchID parameter, select Parameter
Properties, and enter Branch for the prompt for clarity. You will be selecting
the branch name in the drop-down list. - In the available values for the branch parameters, select Get Values from
Query, and then select the Branch_DS dataset. The Value field will be
BranchID, and the Label field will be BranchName. - Follow the same steps to modify the Employee parameters, assigning
Employee_DS and choosing the Value and Label fields as EmployeeTblID and
Employee_Name, respectively. Finally change the prompt to Employee for
clarity as we performed in step 2. When finished, select OK. - Finally, on the Design tab, you will add a grouping for Branch Name to the
table in the report so that as the parameters are selected, you can see that the
report is specific to a branch. To do this, right-click the row header to the left of
the Diagnosis textbox in the table, and select Add Group >> Parent Group. This
will make the Diagnosis group, formerly the first group, now the second group
and will add a new group. Assign the expression value of
=Fields!BranchName.Value to the new group, select the option to Add group
header and click OK in the Grouping dialog box. Next, move the BranchName
field from the new first column row for the Branch group you just created and
into the blank area just above Diagnosis. Also, make the field bold, and resize
the font to 12 points. Now that it is formatted, delete the column that was
created when you added the new BranchName group. You can delete the
column by right clicking it and selecting Delete Columns.
The report will now have populated drop-down lists for the available parameter values, as shown in
Figure 6-28. Notice that for the two parameters where you have added available values, the NULL
checkbox has disappeared.