Link to home
Start Free TrialLog in
Avatar of pauldes
pauldes

asked on

change number format in a SQL Report Server expression string

Basically I get how to change the properties of a cell in a SQL Server Report but I can't figure out how to do it when my expression in a cell is not limited to a single field.

Changing the properties of a cell that has an expression like:
="Total NLR USD: " & Fields!NLR_USD.Value

just leaves the number as, well, a number. How can I edit the expression to have the number in "Value" appear as currency.

The result should print:

Total NLR USD: $1,000,000.00 if value = 1000000

Thanks
Avatar of mjm42
mjm42

Maybe it works when you change it to:

="Total NLR USD: " & Convert(Money, Fields!NLR_USD.Value)
Quickest way is to have:

="Total NLR USD: $" & Fields!NLR_USD.Value

This will work, though will only use $, so it depends if you need to have varying currency formats in your report.
Avatar of pauldes

ASKER

simon, tried that but the number does not format with commas 1,000,000 prints as 1000000

mjm, I get a build error on your suggestion:
 [BC30684] 'Convert' is a type and cannot be used as an expression.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of simon_kirk
simon_kirk
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pauldes

ASKER

Thanks!