Groups | Blog | Home
all groups > sql server reporting services > september 2007 >

sql server reporting services : SQL RS - Expression containing text AND currecny


Randall S. Smith
9/7/2007 9:28:34 AM
i have an expression that i want to show text format and currency format

i.e.

=(field.name.textvalue) & " " & (field.name.currencyvalue)

is there a way i can get it to display both of these formats?

Andrew Backer
9/7/2007 5:52:28 PM
You could try :

= Field!field_name.Value.ToString() + " " + Field!Field_name.Value.ToString("c")

The "C" will cause it to be formatted as currency, with a leading $ and 2
decimal places. Just "ToString" will output it in the normal mode for the
object. If it is a currency object of some kind, you may need to use "d"
or "f2" or a simlar format string with the first one to output it as a regular
#.

// Andrew

[quoted text, click to view]

weilu NO[at]SPAM online.microsoft.com
9/12/2007 6:32:48 AM
Hi ,

How is everything going? Please feel free to let me know if you need any
assistance.

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.
AddThis Social Bookmark Button