# Jasper report - calculation & Variable Expression

Maitri Pujara

Greenhorn

Posts: 4

posted 4 years ago

I am using i-report tool for reports in my application. I am doing totals for some fields and want to use these grand totals to calculate the value of some other variable.

E.G.

I have x,y,z fields. x1,y1 as totals. x1, y1 are variables. Now, I want to use x1 and y1 to calculate the value of Z1 which is not toal, but result of some expression.

like.. Z1= (x1/y1)*100

I think I can keep this expression in properties of Z1 in 'variable expression' but what I should set as 'Calculation'.

Please help. It is urgent.

E.G.

I have x,y,z fields. x1,y1 as totals. x1, y1 are variables. Now, I want to use x1 and y1 to calculate the value of Z1 which is not toal, but result of some expression.

like.. Z1= (x1/y1)*100

I think I can keep this expression in properties of Z1 in 'variable expression' but what I should set as 'Calculation'.

Please help. It is urgent.

posted 4 years ago

http://www.coderanch.com/how-to/java/PatienceIsAVirtue

More important than patience, even, is choosing the right forum. I couldn't figure out how this related to JSF and chances are that no one else here could either. Always look for the forum where the experts in your question hang out.

More important than patience, even, is choosing the right forum. I couldn't figure out how this related to JSF and chances are that no one else here could either. Always look for the forum where the experts in your question hang out.

An IDE is no substitute for an Intelligent Developer.