Skip to main content



      Home
Home » Archived » BIRT » Migration BIRT 4.2.2 to 4.4.2: Does Formatter.format behave differently?(A printed value differs from one version to another printing the same report. )
Migration BIRT 4.2.2 to 4.4.2: Does Formatter.format behave differently? [message #1706381] Wed, 26 August 2015 08:19
Eclipse UserFriend
Hello guys,

I'm migrating from BIRT 4.2.2 to 4.4.2 and I noted a different behavior of the Formatter.

Here below you can see the fixed expression I'm using in the data binding:
var num = Number(dataSetRow["Transaction_Amount"]);
var rounded = Math.round(num);
var formatString = row._outer["Currency Format String"];

var numFormatted=Formatter.format(num, formatString);
var roundedFormatted=Formatter.format(rounded, formatString);

Packages.java.lang.System.out.println("number: " + num + ", rounded: "+rounded + ", formatString: "+formatString+", numFormatted: "+numFormatted +", roundedFormatted: "+roundedFormatted);

Formatter.format(rounded, formatString);


Quote:
BIRT 422:
number: 5362.5, rounded: 5363, formatString: #,##0, numFormatted: 5,363, roundedFormatted: 5,363


Quote:
BIRT 442:
number: 5362.5, rounded: 5363, formatString: #,##0, numFormatted: 5,362, roundedFormatted: 5,363


Why numFormatted changes from a version to another?
Is the Formatter.format function changed from a version to another or/and is there any other reason?

Thank you in advance,
Cristiano
Previous Topic:Does Eclipse BIRT Supports Easy Script?
Next Topic:Enumerating installed fonts?
Goto Forum:
  


Current Time: Mon Jul 07 21:53:19 EDT 2025

Powered by FUDForum. Page generated in 0.03835 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top