SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Multiple values in Actions


Multiple values in Actions

Author
Message
sharonsql2013
sharonsql2013
Mr or Mrs. 500
Mr or Mrs. 500 (584 reputation)Mr or Mrs. 500 (584 reputation)Mr or Mrs. 500 (584 reputation)Mr or Mrs. 500 (584 reputation)Mr or Mrs. 500 (584 reputation)Mr or Mrs. 500 (584 reputation)Mr or Mrs. 500 (584 reputation)Mr or Mrs. 500 (584 reputation)

Group: General Forum Members
Points: 584 Visits: 1265
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
SQLRNNR
SQLRNNR
SSC-Dedicated
SSC-Dedicated (31K reputation)SSC-Dedicated (31K reputation)SSC-Dedicated (31K reputation)SSC-Dedicated (31K reputation)SSC-Dedicated (31K reputation)SSC-Dedicated (31K reputation)SSC-Dedicated (31K reputation)SSC-Dedicated (31K reputation)

Group: General Forum Members
Points: 31876 Visits: 18550
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, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

happycat59
happycat59
SSCarpal Tunnel
SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)

Group: General Forum Members
Points: 4723 Visits: 3215
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", ",")



sharonsql2013
sharonsql2013
Mr or Mrs. 500
Mr or Mrs. 500 (584 reputation)Mr or Mrs. 500 (584 reputation)Mr or Mrs. 500 (584 reputation)Mr or Mrs. 500 (584 reputation)Mr or Mrs. 500 (584 reputation)Mr or Mrs. 500 (584 reputation)Mr or Mrs. 500 (584 reputation)Mr or Mrs. 500 (584 reputation)

Group: General Forum Members
Points: 584 Visits: 1265
I tried using Split , But somehow its only using the first one in the list...
Split("Production,development",",")
happycat59
happycat59
SSCarpal Tunnel
SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)

Group: General Forum Members
Points: 4723 Visits: 3215
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.



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search