Jump to content
We've recently updated our Privacy Statement, available here ×

Chart Label expression with field1 divide field2 always return zero.


leo.cheung

Recommended Posts

I have a Stacked Chart and want to display the value with percentage.

This is the dataset

E2zYAj.png

R0JeD7.png

The Chart's label will become BLANK if using expression: String.valueOf((double)$F{cnt}/$F{total})

ueCf5P.png

 

However if I change to String.valueOf((double)$F{cnt}/1000)

It works, so how to field1 divide field2?

It is so wried since this is very simple calculation and can be perform easily in SSRS or BIRT, but why so complicate in jasper report?

q4mgCE.png

 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...