Showing posts with label selects. Show all posts
Showing posts with label selects. Show all posts

Thursday, March 22, 2012

Conditionally load Drop downs in Parameter toolbar

In trying to incorporate business rules into my SSRS report, I need to be
able to conditionally load drop downs based upon what the selects for other
drop downs.
Can anyone tell me how? Example:
DropDown1 = Country
DropDown2 = State/Region
How Can i leave DropDown2 empty until they select from DropDown1?
Thanks.Hi JrMcG,
Thank you for your posting!
Based on my experience, you could do the following step to get the
Parameters related.
1. Create a dataset and add a Report Parameter named Country.
2. Create another dataset named States and use the parameter in the query
text. For example:
select State from tbl_Region where Country = @.Country
3. Create a new Report Patameter named State and in the Available values,
you need to use From query, and choose the dataset States, Value filed and
Label filed use State.
Then, in the preview, you could see the Parameter State could not get the
value untill you specify the value of Country.
Please try the above steps and let me know the result. Thank you!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi JrMcG,
Have you got any chance to check this issue? Please let me know if you need
any help, thank you!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||You are looking for a "Cascading Parameter" Report; there is a good
example in the sample set for SSRS 2005.
Dennis Graham
JrMcG wrote:
> In trying to incorporate business rules into my SSRS report, I need to be
> able to conditionally load drop downs based upon what the selects for other
> drop downs.
> Can anyone tell me how? Example:
> DropDown1 = Country
> DropDown2 = State/Region
> How Can i leave DropDown2 empty until they select from DropDown1?
> Thanks.|||My subject is very closeley tied to this one so i hope it's OK if I post
here...
I did the same thing but also added an 'all' option in my dataset. Selecting
'all' and a single option works but when selecting multi values the report
breaks. What can i do in my WHERE claus to get this working. Without it the
Bussiness Rules are useless.
"Wei Lu [MSFT]" wrote:
> Hi JrMcG,
> Have you got any chance to check this issue? Please let me know if you need
> any help, thank you!
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>

Saturday, February 25, 2012

Conditional Execution based on Multi-Valued Parameter Selection

If a user selects all (266) parameter values from a mult-valued parameter list, I would like to display a table based on a version of a stored-proc that does not select records using parameter driven criteria.

The total selected count can be acquired by =Parameters!ParmName.Count syntax. Total available parameter values can be extracted by =CountDistinct(Fields!ColName.Value,"DatasetName").

Setting a filter on a table and inspecting the total selected count can limit the number of values executed for the query.

That is great, but I would also like to run an efficient query if all values were selected. Thought I could set a filter on a table and compare these two values, but I can't use an aggregate.

Any ideas?

Decided to create a one row dataset (query) containing a count of the number of values to select from. Used this value in a hidden parameter "PrimaryListCount" and used the new dataset to populate the default report parameter value. Then I determined if all values were selected using the following table filter:

=CInt(Parameters!PrimaryNames.Count) = =CInt(Parameters!PrimaryListCount.Value)

If you have a better solution, I'd like to know about it. If not, hope this can help someone else.