question

Imran1980 avatar image
Imran1980 asked

Create Dynamic Parameters List based on Stored Procedure in SSRS

I want to make a report which displays dynamic parameters based on the list of the stored procedure I select like below (The below screenshot is just for understanding purposes). If I select the first stored procedure from the list then parameters are displayed according to that stored procedure. If I select the second stored procedure then the parameters list should be displayed according to that.

1641399414912.png

My Reports and Reports Parameters tables are given below. If a parameter needs a drop-down then the stored procedure for drop-down would be run and populate the drop-down with a list of values.1641399507750.png

I have read the below article but it does not sever the purpose which I require.

Create Dynamic SSRS Reports Using a Query as an Input Parameter (mssqltips.com)

ssrs
1641399414912.png (25.3 KiB)
1641399507750.png (25.1 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
anthony.green avatar image
anthony.green answered

So if you pick proc 1 you want the parameter list in the top of the report to be “proc, date, company” but if you pick proc 2 you want the list to be “proc, date, company, branch”?

The only way to get that to work is to look at the hidden properties of the parameters and write expressions based on the proc on what to show.


As you may have guessed as you’re playing with properties, every procedure, every parameter must be known up front, as report design is STATIC in the RDL, you cannot dynamically add a new proc to the list and expect it to pull in parameters.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.