Thursday, May 23, 2013

Count Decimal on Crystal Report

 Try This !
numbervar x:= abs({table.field});
stringvar y:= strreverse(totext(x,10,"")); numbervar z:= tonumber(y); numbervar c:= len(totext(z,0,""));
Example: 
Suppose Price is 0.1023000 
strreverse(totext({Price},7)) ==> 0003201.0 tonumber( 0003201.0 ) ==> 3201.0 Round(tonumber( 3201.0 )) ==> 3201 len(totext( 3201 ,0)) ==> 4 ,
so set decimal places to 4

No comments:

Post a Comment