hongming8888 Posted August 3, 2022 Share Posted August 3, 2022 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now