parameter with multiple values
Hi experts,
I have parameter with multiple values and i have Chart, according to selected value(s) from parameter i want to be value field be viewed on this chart?
How to make this happen?
Appreciate any idea
batkaval
November 30th, 2010 4:39pm
simply set the value field to be the result of an expression:
=IIF(Parameters!ParamName.Value = "Option1",Fields!FieldNameForOption1.Value,IIF(Parameters!ParamName.Value = "Option2",Fields!FieldNameForOption2.Value,Fields!FieldNameForOption3.Value))
etc etc - You could also use the SWITCH function rather than nesting multiple IIFs but this may give you some errors if your data value fields are different data types (int vs double etc)Rgds Geoff
Free Windows Admin Tool Kit Click here and download it now
November 30th, 2010 7:56pm
But if there is a thousands of values in Combobox, and they are not selecting one by one. It may differ time to time to our needs.
and there is “,” problem that needs to be cleared with JOIN.
Rgds
batkaval
November 30th, 2010 8:06pm
So you want them to be able to select multiple field names and have them all displayed on the chart?
Thousands of values? You are expecting people to pick from a list with thousands of values? I think a design review may be your best option here....Rgds Geoff
Free Windows Admin Tool Kit Click here and download it now
November 30th, 2010 9:57pm
Hi batkaval,
In order to display series in the chart according to the selected values in the parameter, we can first add all series to the chart values, and then use expressions to determine their
visibilities.
For example, if we need display 3 data fields
OrderQuantity, CostAmount and SalesAmount. We can achieve this by the steps below:
1.
Add the multi-value parameter
p1 with the available values like
Label
Value
OrderQuantity
OrderQuantity
CostAmount
CostAmount
SalesAmount
SalesAmount
2.
Add these 3 data fields to the data values area of the chart.
3.
Right the
OrderQuantity series in the chart and select Series Properties…
4.
In the
Series Properties window, select Visibility in the left list.
5.
Select the option
Show or hide based on an expression, and type in the expression like
=IIf(InStr(Join(Parameters!p1.Value,","),"OrderQuantity")>0,false,true)
6.
Repeat the steps 3 to 5 to configure the visibilities of other series.
After that, series in chart will be displayed based the selected parameter values. However, as Geoff posted, too much values of one parameter or series in one chart might not appropriate.
Thanks,
Tony ChainPlease remember to mark the replies as answers if they help and unmark them if they provide no help
December 2nd, 2010 5:11am