Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Passing multiple values to a Parameter Expand / Collapse
Author
Message
Posted Friday, December 13, 2013 12:35 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, December 13, 2013 3:09 PM
Points: 2, Visits: 7
I am attempting to use one Parameter for multiple uses in a SSRS report and I am having some issues. It works fine when I just pass one value to the query using IN @Parameter. However, I have a SUM that would need to pass all the possible values to this Parameter and I cannot seem to get it to work. I have checked Allow Multiple Values for the Parameter. On the Jump To properties, how can I pass the specific multiple values that I need? Or, can I somehow get the query to ignore the need for the Parameter when I am clicking on the SUM field?
Post #1522838
Posted Friday, December 13, 2013 12:39 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 2:24 PM
Points: 11,990, Visits: 11,007
cliff.clayman (12/13/2013)
I am attempting to use one Parameter for multiple uses in a SSRS report and I am having some issues. It works fine when I just pass one value to the query using IN @Parameter. However, I have a SUM that would need to pass all the possible values to this Parameter and I cannot seem to get it to work. I have checked Allow Multiple Values for the Parameter. On the Jump To properties, how can I pass the specific multiple values that I need? Or, can I somehow get the query to ignore the need for the Parameter when I am clicking on the SUM field?


I assume you mean you are passing a delimited string? You can't use IN like that with a parameter. You first have to parse the value. One of the best ways to do that is found by following the link in my signature about splitting strings.


_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1522841
Posted Friday, December 13, 2013 12:42 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, December 13, 2013 3:09 PM
Points: 2, Visits: 7
Yes, the values are varchar. The basic issue I am facing is this. I have a group of values, let's say A, B and C. For each value, I calculate a quantity and then a SUM of the quantity for all the values. I want to be able to do a Jump To for the same report when I click on the total SUM. I somehow need to pass the values for A, B and C to the report.

I don't see how I can apply anything from that link to my issue. Sorry, I'm still pretty new to this...
Post #1522845
Posted Monday, December 16, 2013 3:18 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, February 27, 2014 12:25 AM
Points: 122, Visits: 290
Have you tried creating a parameter which takes in A,B,C as value and another parameter which depends on the first dataset for operations to perform .

Read cascading parameter :- http://msdn.microsoft.com/en-us/library/dd255197.aspx


______________________________________________________________________

Ankit
MCITP Database developer SQL 2008,MCTS Database Administration SQL 2008
"Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose.
You are already naked. There is no reason not to follow your heart.”
Post #1523136
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse