Saturday, February 25, 2012

displaying % in value

Hi

I am calculating percentage using expression. I want to display % at the end of the result.

If I use P1 or P0 somehow it multiplies the result with 100 I guess.

Here is what my calculated value is

15.384515

and I want to display 15.38%

Using P1 or P0 I am getting 1,538.5%

How can I get the desired result?

Any help would be appreciated.

Regards

Amit

Yeah I always thought that was funny the way RS handles formating %.

You can try dividing your value by 100 and them formating it. I think the percent format requires a number between 0 and 1

e.d =format((field.value)/100,"P0")

that should give you "15%"

|||

You are great Nialhannon.

Thanks for your help. Your solution helped.

Regards

Amit

|||

I remember those issues, and I ended up doing the /100 in the dataset (or Stored Procs)

No comments:

Post a Comment