all groups > sql server reporting services > october 2004 >
You're in the

sql server reporting services

group:

Format Question (Currency)


Format Question (Currency) cmay NO[at]SPAM walshgroup.com
10/26/2004 2:38:48 PM
sql server reporting services:
I know that you can set a textbox to be of format Currency, but how
can I set the text of a textbox equal to a string that has formatted
strings within it?

What I mean is, lets say that I am getting back 2 values: MyFieldA and
MyFieldB, which are both floats (say 12.3123 and 43.2234). I want to
make the text "MyFieldA - MyFieldB", where both are formatted as
currency, so it would look like "$12.31 - $43.22".

Is there a way, with in the section where I specify
Fields!MyFieldA.Value to do something like
Fields!MyFieldA.Value.Format("C") or something like that? anyone
Re: Format Question (Currency) haguewoj NO[at]SPAM swn.com
10/28/2004 1:26:19 PM
Chris,

Maybe something like this:

=(String.Format("{$###,##0.00}"),Fields!MyFieldA.Value) & " - " &
(String.Format("{$###,##0.00}"),Fields!MyFieldB.Value)

I had thought about using cdec, but I don't think that works in RS.
I'm pretty new to the RS world, so I don't know it this will help but
it doesn't hurt to try. Good Luck.

Jonathan

[quoted text, click to view]
AddThis Social Bookmark Button