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

michael.edstrom1

Members
  • Posts

    1
  • Joined

  • Last visited

michael.edstrom1'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. So, I'm currently working on a report in iReport 5.6.0. I'm having a problem with a calculation in a textfield. Language in file: Groovy. Variable = java.lang.Double So I'm getting the price of a product from a field, we can call it: $F{x_x}, this field is a string, but contains only numbers(double) like this, "540,00". What I wan't to do now is first get some code to check for empty fields or nulls, which I do like this: ($F{x_x} == null || $F{x_x} == " ") ? "" : <--- so far so good. What needs to happen now is to take the string that's inside the field(if you pass the first statement) and make this string into a number(double I assume) and then divide it with 0,9. I've found some possible solutions for this in other threads and also tried some of my own but it just doesn't want to work. I just get errors regarding that specific code won't work(in iReport), and the pdf won't open obviously. Suggestions on a solution for this? Thanks in advance.
×
×
  • Create New...