• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How do I Perform a Calculation

 
Ranch Hand
Posts: 2206
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In a detail field within a JasperReport I need to do a calculation based on two other fields in the same record.

( $F{dwgreld} == null ? ( $F{esthrs} != null ? ( $F{prcntcom} != null ? "MYCALCULATION" : "0" ) : "0" ) : "100" )

The "MYCALCULATION" part needs to give the percentage complete example:

(($F{esthrs} - $F{remhrs})\$F{esthrs})*100
[ November 15, 2007: Message edited by: Steve Dyke ]
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'll move this to our "Other Open Source Projects" forum, where you might get an answer.
reply
    Bookmark Topic Watch Topic
  • New Topic