Updating report parameters based on parameter selection? (SSRS)

后端 未结 4 492
抹茶落季
抹茶落季 2020-12-05 06:08

I\'ve created a report in SSRS with two report parameters. I\'d like the second to update it\'s values based on the selection in the first. The first is a list of sales agen

4条回答
  •  时光说笑
    2020-12-05 06:16

    You first create a dataset with a list of items which the user will select from.

    Select ID,Agentname from Agents Order by Agentname
    

    You then create the second dataset;

    eg. Select ID,ItemName from Orders where agentid=@agentid

    IN your report paramenter, you click on agentid parameter and then from a Query on available values. You select dataset1 and ID as value and AgentName as Label.

    Your last dataset will be the actual data. In this You create your statement like :

    Select Quantity, Amount From Orderdetails where OrderID=@orderid

    In reporting service, you go to parameter and the set Order to get value from Dataset2

    So the Order of parameter should be agentid, orderid. Reporting Service will automatically prompt for parameter by order.

提交回复
热议问题