Reputation: 307
I am trying to format a field for salary and can't seem to bring out the currency symbol when doing the formatting. I have tried using the text box field formatter and then I have tried using the expression below.
When I re-run my report after entering the expression I get a #ERROR
in the output. Is there anything else I can try?
=Format(Fields!number.Value, "£")
Upvotes: 21
Views: 77558
Reputation: 307
thanks for your help. I have found another solution to my problem.
I have changed all the formatting properties and then entered the following expression:
=CDbl(FormatNumber((CDbl(Fields!number.Value)),2))
Not the most elegent of solutions but it works.
Upvotes: 2
Reputation: 39566
Set the textbox format as C0
, i.e. currency to 0 decimal places:
This will be affected by the report Language property - set to en-GB
for pounds, as in your example:
You can also set the textbox properties, which also gives you the option to set the symbol outside of the report language:
Finally, you can use a string like:
=Format(Fields!number.Value, "C0")
This does change the field type to a string, unlike the other options, which can have en effect if exporting to Excel.
Upvotes: 48