Welcome to MSDN Blogs Sign in | Join | Help

Formatting currency on a row-by-row basis in Reporting Services

Say you have a table which contains different currency values - each row in your table contains values for stored with a different currency types (see figure 1). You want to display these values in your report and ensure that each value is displayed with the correct currency symbol (figure 2). How do you to this?

Attachment: Currency.jpg (21333 bytes)

 

Assuming you are also storing additional information which allows you to identity each currency (as in the CurrencyType column in figure 1), you’ll have a fairly easy time of it. Just use the Language property of the textbox which will be displaying the currency value ("Converted Money" in figure 2) and set its value equal to an expression:

 

= Trim(FIelds!CurrencyType.Value) 

This formula is using the ISO country / language codes stored in our database table and plugging them right into the property. Note that you must use the ISO codes (thanks, Ayax!) for this to work. If you aren’t storing the ISO codes, you’ll need to add a Switch() statement or some embedded code behind your report to return the ISO codes based on whatever identifier is stored in your database.

Published Thursday, May 17, 2007 11:36 AM by russch
Attachment(s): Currency.jpg

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Russell Christopher s Semi Useful BI Musings Formatting currency on a | Paid Surveys

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker