Dynamic Parameter Name

Who is online?  0 guests and 0 members
Home  »  Forums   »  microsoft business intelligence   »  reporting services   » Dynamic Parameter Name

Dynamic Parameter Name

Topic RSS Feed

Posts under the topic: Dynamic Parameter Name

Posted: 6/8/2012

Jedi Youngling 10  points  Jedi Youngling
  • Joined on: 3/5/2012
  • Posts: 5

Hi,

I have a report with cascading parameters.  I would like for the selection of the first parameter value to not only filter the list for the 2nd, but also dynamically change the 2nd parameter display name.  Is there any way to do this programmatically within SSRS either via a code snippet, editing the XML, report variables, or some combination thereof?

Thx! 


Posted: 6/9/2012

Jedi Master 5642  points  Jedi Master
  • Joined on: 1/21/2010
  • Posts: 249
Answered  Answered

There is not a way to do this in the sense that you are asking. Sure you can create an application that can be used to create and deploy SSRS reports. However, the architecture of SSRS would require you to deploy the report to the server. When deploying a report to the server in this fashion, it would overwrite the existing report and as such make the current execution of the report invalid. Essentially, you can't change the xml of a report under the hood and expect the current execution to work correctly.

You may want to use a generic label for the second parameter and utilize dynamic SQL or conditional expressions in TSQL to determine what the next set of values to use. I did this in the past for a large tire corporation a couple years ago. It wasn't too bad to implement. It just took some extra SQL as I chose to write conditional logic. IE.

Good luck

CREATE PROCEDURE usp_Get_Filter2 
(@ParamValue1 INT) 
AS
IF @ParamValue1 = 1
BEGIN 
     SELECT val as Value, desc as Label FROM Table1 
END
IF @ParamValue1 = 2
BEGIN 
     SELECT val as Value, desc as Label FROM Table2 
END
ETC....

 

Reminder: please be sure to mark this post as answered if you are happy with the response.


Posted: 6/11/2012

Jedi Youngling 10  points  Jedi Youngling
  • Joined on: 3/5/2012
  • Posts: 5

Brian,

Thanks for the response.  We already have the correct values populating based on the cascading parameter.  The problem is the customer doesn't want the generic label for the subsequent parameter.  We achieved this in Cognos, which we are now switching away from, so they've become accustomed to that functionality.  

Anyone know if parameter properties will take expressions sometime in the near future?


Posted: 6/12/2012

Jedi Master 5642  points  Jedi Master
  • Joined on: 1/21/2010
  • Posts: 249

I have not heard any major shifts in the Reporting Services architecture with the exception of PowerView and neither will work the way that you are suggesting that Cognos provided. If you only have SSRS in your environment, your users either need a generic label, not have the functionality or have different reports to support the desired result.


Page 1 of 1 (4 items)