Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

concatenating a %

Status
Not open for further replies.

mjd3000

Programmer
Apr 11, 2009
136
GB
I have a column in my report that I want to add a '%' to. It seems to work fine for where the percentage is less than 100. But for some reason, when the percentage is greater than 100 I get some weird results.

For example, there is a row where the percentage is 26/20, so this should display as 130%. It calculates as 130 when I don't concatenate the %, but when I add the %, I get a result of 1313000%.

The expression I am using is =Fields!FieldName.Value & "%". Can anybody help?
 
Drop the concatenation. Just format the field as percentage. Right click->properties->format

Format code is P
 
When I use P0 (I don't want any decimal places), I am now getting 6100% instead of 61% and 3300% instead of 33%...how can I sort this out?
 
Can you divide the number by 100?

--------------------------
Web/.net Programmer & DBA
Central PA
 
That should do the trick BBurnell.
Fields!FieldName.Value/100.00
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top