Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I was trying to export a report which is in float format. When I do that, all the numbers in excel have a green small tag beside it saying

"The number in this cell is formatted as text or preceeded by an apostrophe".

I have to sum my report values and this can only be done after I convert each cell to number. Is there any possible way to handle this in report itself ?

Thank You.
Posted
Updated 23-Aug-18 4:43am
v3

Here, it has been discussed and shared here: “The number in this cell is formatted as text or preceeded by an apostrophe.”[^]

It says:
To solve this problem we can set:
=Fields!MyField.Value as the Value and set =”###,###,###,##0″ as the Format. You can find the “Format” under the “Appearance” of the properties window.
 
Share this answer
 
Comments
Dhivya.J 2-Apr-13 5:12am    
Thank you. But my report is exported to numbers(exactly saying float values), not in # symbol's. My problem is, I want to "manually convert it into number" to sum the whole column.
Hello,

The issue may be due to you tried to convert a nonnumeric value to an integral value. For expression, if we are use following expression: =CInt(“ABC”), we would get the #Error value in our report.

The root cause is IIF() function always evaluates both the true part and the false part, even though it returns only one of them. This means both the true part and the false part need to be evaluate.

Please refer to the custom code below to work around the issue:

Public Function Conv(ByVal A as String)
Dim B as string
Dim C as Integer
If isnumeric(A) Then
C=CInt(A)
Return C
else
B=CStr(A)
Return B
End If
End Function


Then, we can use the following expression to calculate the value:
=Code.Conv(Fields!PID.Value)


Regards,
Vinoth Paramasivam
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900