Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 add in parameter selected

Author  Topic 

peace
Constraint Violating Yak Guru

420 Posts

Posted - 2013-02-04 : 08:58:24
=Fields!GrossFare.Value

How to add in the expression base on the parameter selected in report?

Example:

Parameter selected for CURRENCY: USD

GrossFare
GrossFare_USD

If parameter selected for CURRENCY: AUS

GrossFare
GrossFare_AUS

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-02-04 : 09:06:17
Did you mean you want to append the currency code?
=CStr(Fields!GrossFare.Value) & "_" & Parameters!Currency.Value
Go to Top of Page

peace
Constraint Violating Yak Guru

420 Posts

Posted - 2013-02-04 : 10:09:45
Yup but i get #error.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-02-04 : 12:25:30
sounds like this to me as I guess you're trying to set a dynamic column header

="GrossFare_" & CSTR(Parameters!Currency.Value)

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

peace
Constraint Violating Yak Guru

420 Posts

Posted - 2013-02-04 : 21:11:04
But this will return GrossFare_USD

My grossFare is something like this 200.99_USD

Is it possible?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-02-04 : 23:07:47
quote:
Originally posted by peace

But this will return GrossFare_USD

My grossFare is something like this 200.99_USD

Is it possible?



then it should be what James suggested

=CStr(Fields!GrossFare.Value) & "_" & Cstr(Parameters!Currency.Value)

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -