Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
690 views
in Technique[技术] by (71.8m points)

reporting services - formatting fields to show currency in SSRS

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, "£")
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Set the textbox format as C0, i.e. currency to 0 decimal places:

enter image description here

This will be affected by the report Language property - set to en-GB for pounds, as in your example:

enter image description here

You can also set the textbox properties, which also gives you the option to set the symbol outside of the report language:

enter image description here

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...