Cascade Parameter
What is Cascade Parameter?
-
Cascading parameters provide a way of managing large amounts of data in a paginated report. You can define a set of related parameters so that the list of values for one parameter depends on the value chosen in another parameter.
-
For example, the first parameter is independent and might present a list of product categories. When the user selects a category, the second parameter is dependent on the value of the first parameter. Its values are updated with a list of subcategories within the chosen category.
-
For example, suppose you have two parameters: Country & Product Line. When you choose the Country then the Product Line parameter lists only those Products which belong to the selected Country.
Objectives
- Create Cascade Parameter & Dataset from it.
Prerequisites
- Two dataset named Sales.ds.
Download dependency files from link given join.zip
Skill Level Required
-
Basic knowledge of Cascade Parameter & SQL.
-
After downloading the zip file, add Sales.ds from zip into the Dataset section of AIV.
-
To add it into AIV follow this Link
Steps to Create Cascade Parameter
-
Login to the AIV using your credentials.
-
Go to the Hamburger menu
Master Data > Parameters.
-
Click on Create from the bottom menu.
-
Fill the details in Create Parameter window as given below:
- Parameter Name: ProductLine
- Prompt Text: Select Productline
- Display Type: Select List Box from the drop down
- Check Dynamic checkbox
- Dataset: Sales.ds
- Display Text: productLine
- Value: productLine
- Linked Parameter: country (Here we are linking existing parameter)
- Filter Column: country
- Click on Submit button & your Parameter Dataset will be created.
-
Go to Dataset from the hamburger menu.
-
Click on create dataset from the bottom menu.
- Fill the details as given below:-
- Name: Cascade Dataset
- Dasource: Test-datasetmapping-datasource-users_role
- Write Query in Query Window as shown in image below :
- For this example we used below Query.
select `productCode` AS "productCode",`productName` AS "productName",`productLine` AS "productLine",`productScale` AS "productScale",`productVendor` AS "productVendor",`productDescription` AS "productDescription",`quantityInStock` AS "quantityInStock",`buyPrice` AS "buyPrice",`MSRP` AS "MSRP" From products where productLine in ({{productline}})
or you can write select * from products where productLine in ({{productline}})
- Go to Parameter section as shown in image below:
- Select Product Line from the drop-down of Linked Parameter.
- Click on Preview button & user will see window as shown below:
-
Two parameter check box are shown because we linked Product Line with Country Column.
-
Fill the both fileds as given below:
- Select Parameter: Switzerland
- Select Productlins: Classic Cars
- Click on Submit & user will see the output in Preview window as below:
-
Click on submit button & your cascade parameter dataset will be created.
-
Created dataset will be available in grid view of dataset section.