V11 - Amounts in Jasper Reports don't have thousand separator

778 views
Skip to first unread message

Nicolas Micoud

unread,
Mar 1, 2024, 9:03:55 AM3/1/24
to iDempiere
Hi,

We migrated our main environnment on v11 this morning and we are facing an annoying bug: amounts displayed in reports generated by Jasper don't have the thousand separator anymore.

Before (v10, jdk 11) :
v10.png

Now (v11, jkd 17) :
v11.png

This is because of https://bugs.openjdk.org/browse/JDK-8225245
A solution is presented here: https://www.droidcon.com/2023/04/20/unit-test-fails-on-jdk17-what-is-the-problem/

But I have no idea how to use it within iDempiere :-/

Any idea ?

Thanks,

Nicolas

Nicolas Micoud

unread,
Mar 1, 2024, 9:09:43 AM3/1/24
to iDempiere
Here's how amount fields are defined in JasperStudio:


report.png

Nicolas Micoud

unread,
Mar 2, 2024, 4:08:36 AM3/2/24
to iDempiere
What I do not understand is that I have a kind of 'Wizard' panel (a specific form in iDempiere) where I format numbers using this same pattern and is still working.

BTW, locally, everything is working fine and I've also tested locally several reports with JasperStudio 6.21 (which is using a jkd 17) and it's working fine too.

Heng Sin Low

unread,
Mar 2, 2024, 5:11:24 AM3/2/24
to idem...@googlegroups.com
Two things come to mind here:
- Master branch's Jasper Report has been upgraded to 6.21, have you tested that ?
- If things are working locally for you, that could be an OS related issue since your local and server OS is likely different.

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/6b02840e-aaff-47ac-9960-15fef3684347n%40googlegroups.com.

Nicolas Micoud

unread,
Mar 2, 2024, 6:11:41 AM3/2/24
to iDempiere
Hi,

I think I'll give a try on master branch with 6.21 version - as it is a quite old issue, perhaps it has been fixed on it.
BTW, do you know if that update will be ported to v11?

Thanks

Nicolas Micoud

unread,
Mar 4, 2024, 11:48:56 AM3/4/24
to iDempiere
Hi,

I didn't find the time to test 6.21, but I've made some additional tests but I have no idea what to conclude

I've created a very simple Jasper Report that lists all payment from DB (DocumentNo, Date, Amount (with #,##0.00 €;-#,##0.00 €).

On the last of our v10 customized instance (with our plugins), is working well.
If logged in French, the thousand separator is the 'space' whereas if I'm logged in English, separator is the 'comma'

v10_FR.pngv10_EN.png




We create new server (Oracle Linux) and install there an iDempiere vanilla version.
I've installed the report there and add some payments in GardenWorld.
Then if I log in French, separator is the 'space' and is the 'comma' if logged in English.

v11_FR.pngv11_EN.png


That's ok !



Now, if I install our customization, I've got the correct separator in English (comma) and no separator at all if logged in French :

v11cust_FR.pngv11cust_EN.png




Our customization do not touch all the reporting or Jasper modules/packages - so I don't see how those plugins can have an impact on the output.

I would tend to think that should be related to JRParameter.REPORT_FORMAT_FACTORY / net.sf.jasperreports.engine.util.FormatFactory ; but I have no idea what to do with that :-/


Any idea?

Thanks

Nicolas Micoud

unread,
Mar 5, 2024, 9:40:31 AM3/5/24
to iDempiere
Hi,

Ok I find the cause !

I have a feature which contains a plugin, a fragment based in ui.zk and another fragment based on net.sf.jasperreports.engine to have fonts for JasperReports.
I have a script that install this feature and everything was working well until migration on v11.
After lots of tests, I've remove the JasperReports font fragment from the feature and install it "manually" (via telnet).
And now all issue are gone.

Nicolas Micoud

unread,
Mar 12, 2024, 9:37:21 AM3/12/24
to iDempiere
Reopening this as there is still an issue
If the Text Field in the Jasper report is using a 'basic' font (such as DejaVu), numbers are correctly formatted.
But if the text field is using a 'non basic' (but contained in our fragment) the number is not correctly formatted.

You can see in the screenshot that the first 2 amount columns are correctly formatted (DejaVu) but the third one is not (Verdana).

2024-03-12 14_35_12-Expert Light DEMO — Mozilla Firefox.png

Any idea where to look?
As a workaround, I can change all reports to use DejaVu but I would prefer doing that.

Thanks,

Nicolas

Heng Sin Low

unread,
Mar 12, 2024, 9:55:07 AM3/12/24
to idem...@googlegroups.com
Perhaps you just need to update the fonts in your fragment plugin ?

Nicolas Micoud

unread,
Mar 12, 2024, 10:09:05 AM3/12/24
to iDempiere
what do you mean "update the fonts" :-/
you mean the ttf files?

Heng Sin Low

unread,
Mar 12, 2024, 10:14:41 AM3/12/24
to idem...@googlegroups.com
Yes, the ttf font files.

Nicolas Micoud

unread,
Mar 12, 2024, 10:21:07 AM3/12/24
to iDempiere
from what I see I already got the last version of Verdana (2.35)

Heng Sin Low

unread,
Mar 12, 2024, 11:13:40 AM3/12/24
to idem...@googlegroups.com
Did it happen with other fonts ? If that only happens with Verdana, it must be due to bugs in the Verdana font file.

Nicolas Micoud

unread,
Mar 12, 2024, 11:32:29 AM3/12/24
to iDempiere
I haven't tested all fonts, but same behaviour with Arial and ArialNarrow

Nicolas Micoud

unread,
Mar 12, 2024, 11:49:44 AM3/12/24
to iDempiere
I mean, the font is used, but numbers are not formatted

2024-03-12 16_47_47-Expert Light DEMO — Mozilla Firefox.png

The 2 first columns are DejaVuSans
Then is Verdana
Then Arial
And ArialNarrow

Norbert Bede

unread,
Mar 12, 2024, 1:17:23 PM3/12/24
to iDempiere
hi, 

2cents, 
how you are deploying the fonts ?
when locally works, then usually server has not installed correctly fonts - we have similar issues.
we are deploy it with plugin, then testing in adobe acrobat in properties, does fonts are properly included.
nb

Nicolas Micoud

unread,
Mar 12, 2024, 1:31:40 PM3/12/24
to iDempiere
Hi,

It is deployed as a standalone fragment (and its status is 'Fragment' on Felix console).

But as the font are correctly displayed on Text fields, I would tend to think there are correctly installed (without the fragment, all text is using same font)
Issue is "just" when a number has to be formatted. And in this case, it doesn't work (and it is since migration to v11)

Nicolas

Heng Sin Low

unread,
Mar 12, 2024, 7:55:01 PM3/12/24
to idem...@googlegroups.com
Perhaps you can create a Jira ticket with testable sample so me or others can take a look.

Nicolas Micoud

unread,
Mar 14, 2024, 7:50:46 AM3/14/24
to iDempiere
Reply all
Reply to author
Forward
0 new messages