#1 2019-01-29 00:37:14

aditi.raiter
Member
Registered: 2018-05-01
Posts: 25

Passing value of a selected parameter

Is it possible to pass the value of selected parameter to another parameter in the same report?

Example : If a report has 2 Data source parameters - country and state. If I select country = 'US' , the parameter value would additionally get passed to state report parameter so that it can append an  extra condition to get states where country is 'US'. This way,  in the list drop down the user gets to select states of US and not of other countries.

Thanks
Aditi

Offline

#2 2019-01-29 07:54:08

eduardo
Administrator
Registered: 2016-11-01
Posts: 1,080
Website

Re: Passing value of a selected parameter

Hi Aditi,

yes, this is possible with datasource parameters. These are called cascading parameters.

Usually you would write your parameter2 query as something to the extend of:
Select key_col, val_col from mytable where some_col = $P{param1}
Also, please note this: Don't forget to add myValue as a dependent parameter: "Parameter properties" -> "Depends on"

Check here:
https://forum.reportserver.net/viewtopic.php?id=1344
and here:
https://reportserver.net/en/guides/admi … cascading/

Regards,
Eduardo

Offline

#3 2019-01-29 14:52:19

aditi.raiter
Member
Registered: 2018-05-01
Posts: 25

Re: Passing value of a selected parameter

That helps. Thanks so much !

Offline

Board footer

Powered by FluxBB