Hi, I am trying to set the format of a numeric cell using the Design API to 2 decimal places to no avail.<br />
<br />
I have tried the method suggested by the following post : <a class='bbc_url' href='
http://www.birt-exchange.org/org/forum/index.php/topic/20656-changing-column-decimal-format-with-the-de/page__s__4ad88e070f4394c84825b9e851fec20c'>Changing column decimal format with the DE</a><br />
to no avail.<br />
<br />
My code looks like this:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
String colFormat="#0.00";
DataItemHandle dih =(DataItemHandle)cell.getContent().get(0);
NumberFormatValue nfs=new NumberFormatValue();
nfs.setPattern(colFormat);
dih.clearProperty(StyleHandle.NUMBER_FORMAT_PROP);
dih.setProperty( StyleHandle.NUMBER_FORMAT_PROP, nfs );
</pre>
but to no avail. It formats the string 1 only as "1.0" instead of "1.00" as I would expect.<br />
<br />
I took a look at what was in the report design file and the XML for the column looks like this:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<cell id="341">
<property name="paddingBottom">0.1pt</property>
<data name="data_ratio" id="342">
<structure name="numberFormat">
<property name="pattern">#0.00</property>
</structure>
<property name="textAlign">center</property>
<property name="height">8pt</property>
<property name="width">24pt</property>
<property name="resultSetColumn">ratio</property>
</data>
</cell>
</pre>
Does anyone have any ideas?<br />
<br />
Thanks.