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


Multiple Choice and Hidden Reports


Multiple Choice and Hidden Reports

Author
Message
wafw1971
wafw1971
SSC-Enthusiastic
SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)

Group: General Forum Members
Points: 162 Visits: 155
On Report Builder 3.0 I have created 6 reports that are hidden unless it is selected in a parameter:

Report Code Visibility string:

=iif(Parameters!WhichReport.Value(0) = "Occupancy", False, True)

But what I want to do is make the Parameter a multiple select parameter so someone can choose two charts instead of 1 or choose all 6 etc but whatever selection is made all other reports need to stay hidden. Can this be done and if so how?

Thanks

Wayne
Steven.Howes
Steven.Howes
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1616 Visits: 2354
The only way I thought of is definately a ugly workaround. I usualy pass multi values parameters to reports, not use them in the report itself.

You could pass your MV parameter to a db Stored Proc as a string using =Join(@ParamName.Value,",")
Then in the SP split the values into a result set and return that.

you'd start with "value1,value2,Value3"
and get as a dataset
Value1
Value2
Value3

Then use those values to control your Visibility.
Ray M
Ray M
SSCertifiable
SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)

Group: General Forum Members
Points: 5061 Visits: 1076
One thing off the top of my head. The Join function will create a string of selected values.

Put this in each sub report definition.
=iif(Join(Parameters!ReportParameter1.Label,",").Contains("Occupancy"),False,True)


One thing to note.
All Sub reports will "fire" even if you do not have the visble flag set to true. Meaning the queries for all 6 reports will execute.
One way to cheat is add a parameter that the proc will use if its "false" then it will return an empty recordset that executes immediatelly. Or if your passing a daterange to the subreport make the endDate before the startdate, and it will execute immediatelly and return no rows. Make sense?
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