cancel
Showing results for 
Search instead for 
Did you mean: 

HOw to display Number in Scientific Notation in version 2008

Former Member
0 Kudos

HI

I am using Access database, and I have number field I want to display that number field in Scienfic notation

So can u gudie me how to display number in Scienfic notation in Crystal Report 2008

Thank U

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Here's a quick UDF I threw together that works for positive exponents. Just add it to your Report Custom Functions.

Function (numbervar innum)

local stringvar Original;

local stringvar before ;

local stringvar after ;

local numbervar expo ;

local stringvar combo ;

local stringvar outnum;

Original := totext(innum) ;

Original := replace(Original,",","");

if instr(Original,".") > 0

then (before := left(Original,(instr(Original,".")-1)) ; after := mid(Original,instr(Original,".")+1); expo := len(before)-1)

else (before := Original ; after := '0'; expo := len(Original)-1) ;

combo := before&after ;

outnum:= left(combo,1)"."mid(combo,2)"E"totext(expo,0);

Former Member
0 Kudos

There should be either a + or & before and after mid(combo,2)

the plus signs got turned into italic commands.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Gopal,

There is documentation u201CAdditional Functions you can add to Crystal Reportsu201D. It lists and describes all the supported Additional User Functions contained in various UFL files available on the Crystal Reports.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f047d2d3-871e-2b10-92ac-9276c19e...

Regards,

Alpana