Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 12:19
Cristiano Zanotti is currently offline Cristiano ZanottiFriend
Messages: 1
Registered: August 2015
Junior Member
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: Tue Apr 23 11:40:12 GMT 2024

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

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

Back to the top