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

Multiple values in Actions Expand / Collapse
Author
Message
Posted Wednesday, February 05, 2014 3:49 PM
SSC-Enthusiastic

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

Group: General Forum Members
Last Login: Thursday, April 17, 2014 2:07 PM
Points: 169, Visits: 506
Can I pass multiple values to a subreport.
I need to find the total value which is based on three values for the same parameter.
In text box Properties > Actions > I select device type which is a parameter in my subreport and on the right hand side I need " Production" and Development " both values to be passed. (Hard coded)
How can I do so?

Device_Type ="Production,Development" is not working
Post #1538397
Posted Wednesday, February 05, 2014 5:51 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 3:56 PM
Points: 20,466, Visits: 14,099
sharonsql2013 (2/5/2014)
Can I pass multiple values to a subreport.
I need to find the total value which is based on three values for the same parameter.
In text box Properties > Actions > I select device type which is a parameter in my subreport and on the right hand side I need " Production" and Development " both values to be passed. (Hard coded)
How can I do so?

Device_Type ="Production,Development" is not working


Does the subreport split strings such as this on commas? If not then it is reading those values as a single device type.

In answer to the question can a subreport receive multiple parameters, yes you can pass multiple parameters to a subreport. But can you pass multiple parameter values to a single subreport parameter - the answer is it depends. You have to have a means to split those parameter values so the report can run.




Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1538433
Posted Wednesday, February 05, 2014 7:16 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 9:21 PM
Points: 2,842, Visits: 2,423
Assuming the parameter is expected multiple values, I think that you will need to send the values as an array of values instead of a comma separated string.

You could try using an expression like

=Split ("Production,Development", ",")



Post #1538446
Posted Thursday, February 06, 2014 10:00 AM
SSC-Enthusiastic

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

Group: General Forum Members
Last Login: Thursday, April 17, 2014 2:07 PM
Points: 169, Visits: 506
I tried using Split , But somehow its only using the first one in the list...
Split("Production,development",",")
Post #1538745
Posted Thursday, February 06, 2014 7:45 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 9:21 PM
Points: 2,842, Visits: 2,423
sharonsql2013 (2/6/2014)
I tried using Split , But somehow its only using the first one in the list...
Split("Production,development",",")


Does the parameter in the sub report accept multiple values ? If it doesn't, this is exactly what I would expect.



Post #1538976
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse