Showing posts with label property. Show all posts
Showing posts with label property. Show all posts

Wednesday, March 28, 2012

Multi Select Parameter in RS2005

I'm using the possibility to define some parameters of my reports having the
property multi-select. On all my reports I always give information on the
first page on the parameters used to generate the output. For parameters that
do not have the property multi-select this works by using expressions
= Parameters!id_status.Value and = Parameters!id_status.Label
where id_status is a parameter
For a multi-select parameter I want to do the same; how ?I guess the new release of RS 2005 does support multi value select. I was
reading FAQ section on Microsoft site, that it is possible to pass multi
value parameters into the report. The way it is implemented is like this.
In a dropdown which lists the values, check all the values and then view the
report. RS constructs the SQL behind the scene.
Hope this helps..
Suresh
"RDC" wrote:
> I'm using the possibility to define some parameters of my reports having the
> property multi-select. On all my reports I always give information on the
> first page on the parameters used to generate the output. For parameters that
> do not have the property multi-select this works by using expressions
> = Parameters!id_status.Value and = Parameters!id_status.Label
> where id_status is a parameter
> For a multi-select parameter I want to do the same; how ?|||I known it works; I want to display the selected values in my report by using
something like
= Parameters!parameter_name.Value and = Parameters!parameter.Label
"Suresh" wrote:
> I guess the new release of RS 2005 does support multi value select. I was
> reading FAQ section on Microsoft site, that it is possible to pass multi
> value parameters into the report. The way it is implemented is like this.
> In a dropdown which lists the values, check all the values and then view the
> report. RS constructs the SQL behind the scene.
> Hope this helps..
> Suresh
> "RDC" wrote:
> > I'm using the possibility to define some parameters of my reports having the
> > property multi-select. On all my reports I always give information on the
> > first page on the parameters used to generate the output. For parameters that
> > do not have the property multi-select this works by using expressions
> > = Parameters!id_status.Value and = Parameters!id_status.Label
> > where id_status is a parameter
> > For a multi-select parameter I want to do the same; how ?|||If you change a report parameter to be multi value, the .Value property will
return an object[] rather than an object. Hence you can no longer e.g. write
expressions like =Parameters!MVP1.Value.ToString().
To access individual values of a multi value parameter you can use
expressions like this:
=Parameters!MVP1.IsMultiValue
boolean flag - tells if a parameter is defined as multi value
=Parameters!MVP1.Count
returns the number of values in the array
=Parameters!MVP1.Value(0)
returns the first selected value
=Join(Parameters!MVP1.Value)
creates a space separated list of values
=Join(Parameters!MVP1.Value, ", ")
creates a comma separated list of values
=Split("a b c", " ")
to create a multi value object array from a string (this can be used
e.g. for drillthrough parameters, subreports, or query parameters)
See also MSDN:
* http://msdn.microsoft.com/library/en-us/vblr7/html/vafctjoin.asp
* http://msdn.microsoft.com/library/en-us/vbenlr98/html/vafctsplit.asp
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"RDC" <RDC@.discussions.microsoft.com> wrote in message
news:4CBB1232-BEC3-4D0F-BC55-F1FD732F3AB8@.microsoft.com...
>I known it works; I want to display the selected values in my report by
>using
> something like
> = Parameters!parameter_name.Value and = Parameters!parameter.Label
> "Suresh" wrote:
>> I guess the new release of RS 2005 does support multi value select. I was
>> reading FAQ section on Microsoft site, that it is possible to pass multi
>> value parameters into the report. The way it is implemented is like this.
>> In a dropdown which lists the values, check all the values and then view
>> the
>> report. RS constructs the SQL behind the scene.
>> Hope this helps..
>> Suresh
>> "RDC" wrote:
>> > I'm using the possibility to define some parameters of my reports
>> > having the
>> > property multi-select. On all my reports I always give information on
>> > the
>> > first page on the parameters used to generate the output. For
>> > parameters that
>> > do not have the property multi-select this works by using expressions
>> > = Parameters!id_status.Value and = Parameters!id_status.Label
>> > where id_status is a parameter
>> > For a multi-select parameter I want to do the same; how ?