Report Preview : Malformed format string "#0,##"


I have an exception raised everytime I try to display a numeric value in a Report.
Here is my configuration:
Ignition : Version 7.8.1 (b2016012216)
Java : Oracle Corporation 1.8.0_40 (On Gateway)
OS : Linux 64 bits
Locale : fr_FR

This is easily reproducible. I start from a freshly lauched Designer. I create a new Report and a new datasource (MySQL):

SELECT 'Label 1' as 'Label', 2 as 'Value' FROM DUAL
SELECT 'Label 2' as 'Label', 3 as 'Value' FROM DUAL

I then drag and drop my query from the Key Browser to the Design part. It automatically creates a Table.
I set the first column to display ‘Label’ and the second to display ‘Value’.
I click on “Preview” and get a java.util.IllegalArgumentException : Malformed format string “#0,##”.

The things I tried:
[li]Removing the display of the Value in the second column allows me to have a preview which shows my Labels correctly (but, of course, without my values…)[/li]
[li]Trying to set another Number Format, in the Property Inspector pops up an error Windows when I click on “OK” after selecting the Number Format. The error window is without message but with the following compact details:[/li]
caused by IllegalArgumentException: Malformed format string “#0,##”

Ignition v7.8.1 (b2016012216)
Java: Oracle Corporation 1.8.0_73[/code][/li][/ul]
Seeing the Java Version, I guess it comes from the Designer side (This is the version currently installed on my computer).

Am I doing something wrong ?

Thank you in advance.

Format strings must be written as if in the english / american locale. The system will execute the format in the current locale, using ‘,’ instead of ‘.’ as the decimal separator, for instance.

What Phil said – you need to use non-localized number formats throughout Ignition. We needed to do that because the locale can change at any time, but the number format needs to stay consistent.

Also, there was an issue with report number formats in 7.8.0 and 7.8.1 in non-English locales. :blush: That should be fixed in 7.8.2. (changelog) You can just update the reporting module if you want – the 7.8.2 reporting beta only requires 7.8.1 on the platform.

The thing is that I do not write any format string anywhere.

But this gave me the idea to write a format string in the Number Format field. However typing “#0,##” ou “#0.##” gives the exact same error message : Malformed format string “#0,##” (with a “,” not depending on the decimal separator I used in the field)

[EDIT] I’ll give a try to the 7.8.2 report module on a test platform.

Tested with the 7.8.2 Report module and it works.

Thank you. :slight_smile: