Minus sign in IFS Reports | IFS Community
Solved

Minus sign in IFS Reports

  • 12 February 2020
  • 4 replies
  • 185 views

Userlevel 7
Badge +15
  • Superhero (Partner)
  • 355 replies

Hi All,

 

We noticed that the minus sign for currency figures in IFS reports is different based on language.

Eg:

Seems that English is used short minus (U+002D) and for the Swedish uses long minus (U+2212).

Pagero OCR does not recognise the long minus so it causes trouble for customer.

Has anyone had this problem and found a solution?

Example in Apps10 UPD 5: Invoice

Left: English Right: Swedish

 

icon

Best answer by ChanakaAmarasekara 12 February 2020, 08:33

View original

4 replies

Userlevel 7
Badge +11

Hi,

Assuming that this is a Report Designer layout, the date number formatting is done based on the Java locale of the locale passed when printing or previewing. So if this is different then I has to be the Standard Java formatting for that locale.

You can edit the layout and give you custom negative number format and symbol without making it work based on the locale. However, as this is a hardcoded value it will be the same for all locales and languages.

Hope this helps,

 

Userlevel 7
Badge +15

Hi Chanaka,

 

Thanks for the answer. hardcoding the negative number format seems to work!

But seems it’s not the standard java formatting causes the difference. If you check the sample section for Number formatting popup in report designer, it does’t show any significant difference for negative and positive formats for swedish and english.

I tried this sample to verify the java formatting out of curiosity 😎

 NumberFormat swedishNumberFormat = NumberFormat.getInstance(new Locale("sv", "SE"));
NumberFormat englishNumberFormat = NumberFormat.getInstance(new Locale("en","US"));

Number val = -123456.789;
System.out.println("Swedish format " + swedishNumberFormat.format(val));
System.out.println("English format " + englishNumberFormat.format(val));

output

Swedish format -123 456,789

English format -123,456.789

 

Cheers!

Userlevel 7
Badge +11

Hi,

Thanks for testing and for the clarification. What I meant by Java formatting is the format that is output by the Java utility library we use to format numbers which is a 3rd party one library. Maybe there is a fault in it. If you want, please create a support issue for this and we can further investigate it.

 

Regards,

Userlevel 7
Badge +15

Hi,

Thanks for testing and for the clarification. What I meant by Java formatting is the format that is output by the Java utility library we use to format numbers which is a 3rd party one library. Maybe there is a fault in it. If you want, please create a support issue for this and we can further investigate it.

 

Regards,

 

Hi Chanaka,

Thanks for getting back. Your answer worked well for the problem and no we don’t need to create a support case. :sunglasses:

Cheers!

 

Reply