Showing posts with label multi-valued. Show all posts
Showing posts with label multi-valued. Show all posts

Sunday, February 19, 2012

How to define multi-valued 'default value' parameters for a report on the ReportServer

Can someone please explain how i would define a multi-valued default parameter within the report Properties -> Parameters. I have an OLAP based report with multi-value parameters. I do not want to set the default values from within BIDS. Instead, I'd like to do this from the ReportServer (after report deployment). I have no problem when i enter a single value as a 'default value', for example:

ReportParm1 String [Deal Dim].[Shelf].&[AAM]

But, how would i define it with multiple values as a 'default value' ?, for example:

ReportParm1 String [Deal Dim].[Shelf].&[ABC] , [Deal Dim].[Shelf].&[DEF]

NOTE: It appears that you cannot use expressions, such as the 'split' function in the 'default value' space.

Any help would be greatly appreciated.

thank you.

Once you publish the report, you cannot edit the expressions that define the defaut or valid values. If you have a set of expressions in the RDL, you'll be able to choose from the evaluated values of the expressions, but you won't be able to modify the expressions themselves.

If you just want to choose from a list of values derived from expressions, put the expressions in the RDL and mark the parameter as MultiValue:

<ReportParameter Name="IntegerParam">
<DataType>Integer</DataType>
<DefaultValue>
<Values>
<Value>=(1+1)</Value>
<Value>123456</Value>
<Value>-123456</Value>
<Value>=CInt(123456/123456)</Value>
</Values>
</DefaultValue>
<MultiValue>true</MultiValue>
<Prompt>Integer</Prompt>
</ReportParameter>

If you're meaning to emit the strings representing the expressions instead of the evaluated expressions, then just make the parameter a multivalued string parameter:

<ReportParameter Name="IntegerParam">
<DataType>Integer</DataType>
<DefaultValue>
<Values>
<Value>="(1+1)"</Value>
<Value>="123456"</Value>
<Value>="-123456"</Value>
<Value>="CInt(123456/123456)"</Value>
</Values>
</DefaultValue>
<MultiValue>true</MultiValue>
<Prompt>Integer</Prompt>
</ReportParameter>

Now you can use the string value as an expression.

How to define multi-valued and composite attribute

Hello All,
I want to implement an address field in a table. But,
this address field is a multi-valued attribute. Also, I want to make it
as a composite field(so that all the info viz, city,st,zip,tel,email
etc can be tied together)
Can anyone tell me how to implement this using T-SQL?I sounds as though you want to store the entire address in a single
table column. You COULD just use a long string, say varchar(255) for
example, but do that and you will never be able to query any of the
individual parts without driving yourself mad in the process. Do you
really want to give up being able to ask for just the addresses in
California? Or just the phone numbers in a specific area code?
The proper way to do this in a database is with multiple columns. One
(two is better) for street address, one for city, one for state, one
for zip, one for phone, one for email. If you need to string them
together that is easy to do when you retrieve them.
Roy Harvey
Beacon Falls, CT
On 3 Mar 2006 10:45:35 -0800, "juventus" <saurabh.kotkar@.gmail.com>
wrote:

>Hello All,
> I want to implement an address field in a table. But,
>this address field is a multi-valued attribute. Also, I want to make it
>as a composite field(so that all the info viz, city,st,zip,tel,email
>etc can be tied together)
>Can anyone tell me how to implement this using T-SQL?