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 5, 2014 3:49 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, July 30, 2014 1:01 PM
Points: 215, Visits: 639
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 5, 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 @ 9:43 AM
Points: 21,632, Visits: 15,292
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 5, 2014 7:16 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 10:24 PM
Points: 2,954, Visits: 2,557
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 6, 2014 10:00 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, July 30, 2014 1:01 PM
Points: 215, Visits: 639
I tried using Split , But somehow its only using the first one in the list...
Split("Production,development",",")
Post #1538745
Posted Thursday, February 6, 2014 7:45 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 10:24 PM
Points: 2,954, Visits: 2,557
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