How to set a cell pattern using net.sf.jasperreports.export.xls.pattern to export time format to Excel when there is no value

Hi all,
I'm currently creating a budget management excel report.

The report has a budget entry field using Text Field element.

This item is blank and is an operational specification in which the budget manager inputs the amount to the export in Excel report.

And it is a requirement that this item has Excel amount formatting.

If there are any numbers, for example zero, it will format fine.

However, if there is no value, the set format could not be reflected in the cell.

I have tried two formatting methods.

Method 1: How to format the Patten property of a Text Field element

<textField pattern="#,##0">

 

Method 2: How to set the net.sf.jasperreports.export.xls.pattern property in the Text Field element and format the Value

<textField>

<reportElement key="" style="Style7" x="104" y="42" width="58" height="14" uuid="cb95cc41-dd52-4ca3-9c53-211993d223dd">

<property name="net.sf.jasperreports.export.xls.pattern" value="#,##0"/>

</reportElement>

</textField>

 

Reference article:net.sf.jasperreports.export.xls.pattern to export time format to Excel | Jaspersoft Community

 

Is there a way to force the format even if there is no value?

 

The version of Studio I'm using is 6.5.1.


Best Regard.

hongming8888's picture
Joined: Feb 18 2016 - 5:03am
Last seen: 2 weeks 5 days ago

0 Answers:

No answers yet
Feedback