Home
DevShare Downloads
BIRT Dynamic Number Formatting
Virgil
<p>If you have a number format that changes for each row in your report this approach keeps the Data item numeric so it can be rendered to a spreadsheet and manipulated as a number.</p>
<p>In the OnRender event for the Data element add a script to modify the data format, i.e.:</p>
<pre>var currency = this.getRowData().getColumnValue(\''Currency\'');this.getStyle().numberFormat = currency + \"###0.00{RoundingMode=HALF_UP}\";</pre>
<p>See <a href=\"
http://www.spudsoft.co.uk/2011/10/lsned47-birt-dynamic-number-formatting/\">here</a>
; for more details.</p>
http://www.spudsoft.co.uk/2011/10/lsned47-birt-dynamic-number-formatting/
Find more posts tagged with
Comments
There are no comments yet