In a Birt report I'd like to change the number format depending on the data values.
I tried this in onRender of the table's script to test how changing format programmaticaly :
var df = new Packages.java.text.DecimalFormat("#,###.000000");
df.format(row["tensionEcm1"]);
There is no effect on the column display. Any ideas?
df.formatis a function that returns the formatted value as a string. You are calling this function, but you throw away the result!What you should do: Take your JS as is, but remove the final semicolon
;, and use this as an expression for a dynamic text item (with content type "Plain").