SoFunction
Updated on 2025-03-06

sql2008 Setting the subcategory report parameters available values ​​and default values ​​Steps to share

1. Click OK. Next, create the @Product parameter that depends on the @Category value and the @Subcategory value. Add value dataset for report parameters Product In the Report Data pane, right-click AdventureWorks_Ref, and then click Add Dataset. In Name, type ProductValues. Paste the following query text into the Query pane:

2. Click "OK". At this point, a ProductValues ​​dataset containing a Product field is added to the Report Data pane. Next, set the properties of the @Product parameter and use the values ​​in the above query as their available values ​​and default values.

3. In the "Dataset" drop-down list, click SubcategoryValues.

4. In the "Dataset" drop-down list, click SubcategoryValues.

5. Click "Get Value from Query".

6. In the Parameters folder of the Report Data pane, right-click Subcategory, and then click Parameter Properties.

7. In the Value field, click Subcategory.

8. In the Value field, click Subcategory.

9. Click "Available Values".

10. Click "Get Value from Query".

11. In the "Tags" field, click Subcategory.

12. Click "Default Value".