title: Number format a decimal in Birt reports
body: <p>I have a table which gives me values in Nos. and Decimal (weight-kg)
  E.g.10.455 Kg ( that is 10 Kg and 455 gms)
       and nos. as in 10 Nos.</p>
  
  <p>Now all these values come from a column (Decimal (10,3)-mysql) in table and based on the unittype column I have to decide whether to have 3 decimal or zero decimal in the BIRT report.</p>
  
  <p>I know that through scripting the values can be modified.. but I am unable to utilise the scripting. </p>
  
  <p>I am writing this on onFetch</p>
  
  <pre><code>if(row["unittype"]=="Nos")
  var df = new Packages.java.text.DecimalFormat("#,###.##");
  else
  var df = new Packages.java.text.DecimalFormat("#,###");
  
  df.format(row["invoicedquantity"]);
  this.setDisplayValue(df);
  </code></pre>
  
  <p>I am unable to get the values</p>