Is it possible to dynamically change the pattern used for formatting numbers?
In my scenario, we are batch printing many invoices at once. The numeric formatting is based on the location of the recipient of the each invoice. This location is part of the result set of data. If Invoice #1 is from US then the format should have standard US formatting with the period used from decimal place and comma for digit grouping (#,##0.00). However, if Invoice #2, in the same batch, has a Location of EU, then the format should change to a comma for decimal place and a period for digit grouping (#.##0,00). I can't change the Locale because the pattern could change based on the Location of the recipient. Any assistance would be appreciated.
2 Answers:
Hello,
It looks like without changing locale, it's difficult to dynamically change the pattern used for formatting numbers.
We found similar below community article where similar situation was encountered.
https://community.jaspersoft.com/questions/518137/dynamic-double-pattern
Might be this article help you however, we request you to log a feature request for your idea.
Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times.