Jump to content
Changes to the Jaspersoft community edition download ×

augarte

Members
  • Posts

    270
  • Joined

  • Last visited

Community Answers

  1. augarte's post in Handling null values in charts was marked as the answer   
    Hi subashmy, 
    What you can do is to create a variable that depends on the value of $F{totalCt} and another one that depends on $F{totalMin}, the "Variable Expression" should be as follows: 
    $F{totalCt} == null ? Double.valueOf("0.0") : $F{totalCt} --> For $V{TotalCt} variable
    $F{totalMin} == null ? Double.valueOf("0.0") : $F{totalMin} --> For $V{TotalMin} variable
    This way, if the value of the fields is null you'll have 0.00 in the variable, and otherwise you'll have the same value you have in the field. The you should change the variable expression in orther to use variables instead of fields: 
    ' Summary
    Total # of calls: ' + new DecimalFormat("#,000").format($V{totalCt}) + '
    Total minutes: ' + new DecimalFormat("#,000").format($V{totalMin})
    Maybe there is an easier option but I think this should work for you. 
    Let us know if you solve your problem.
    Hope this helps,
    Aitor
×
×
  • Create New...