Jump to content

jbessmer

Members
  • Posts

    2
  • Joined

  • Last visited

jbessmer's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hi Everyone, I'm a newbie and attempting to divide a BigDecimal field (bdfield) by a String field (strfield) in Jaspersoft Studio. I've tried about 2 dozen approaches based on what I've read on these and other forums, but haven't been successful. Does anyone have a preferred approach? Edit: Here are some approaches I've tried: $F{bdfield}.divide(Integer.parseInt($F{strfield})).setScale(2, RoundingMode.CEILING) $F{bdfield}.divide(new Integer($F{strfield})).setScale(2, RoundingMode.CEILING) $F{bdfield}.setScale(2, RoundingMode.CEILING) / new Integer($F{strfield}) $F{bdfield}.doubleValue() / new Double($F{strfield}) $F{bdfield}.doubleValue() / new Integer($F{strfield}) $F{bdfield}.doubleValue() / Double.parseDouble($F{strfield}) Here is the error on the last one: Double.parseDouble cannot be resolved to a type value = ((java.math.BigDecimal)field_bdfield.getValue()).doubleValue() / new Double.parseDouble(((java.lang.String)field_strfield.getValue())); Thanks for taking a look,
×
×
  • Create New...