sree
sree

Reputation: 3

number format in pentaho report designer

I am working on pentaho report designer HereI created one cross tab report. When I preview the report it is showing me results as below

name total

A 598.00

B 273.00

c 124.00

d 0.23

e 0.23

f 0.00

g 273.00

In the above results I want only the particular values should look in decimal format Like I want only o.23 in the above result look like in decimal format and all the other I want to look like integer with out any decimal portions. Is there any expression I can write. Thanks in advance

Upvotes: 0

Views: 2609

Answers (2)

metk
metk

Reputation: 99

Maybe you should use Truncate function inside you query, something like truncate(total,2), this will keep 2 digits after the ',' and if your totals end with 00 they won't be shown automatically.

Upvotes: 0

In Pentaho report designer, you must define a data type for your inputs(https://www.screencast.com/t/y440gotpnp). The case that you describe could be treated with a formula(check the floating numbers e.g. different to "00" ... ) and as an output data type you could use a string(text)

Upvotes: 1

Related Questions