Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Number formatting in BIRT 2.3.1
Number formatting in BIRT 2.3.1 [message #551885] Tue, 10 August 2010 00:17 Go to next message
Amit Bhargava is currently offline Amit BhargavaFriend
Messages: 4
Registered: August 2010
Junior Member
Hi all,

Am trying to get some numeric data in the following format

##,##,###.00

In other words, the 3 least significant digits need to be together and grouping is of every 2 digits after that.

eg: 12,12,223.45

Is this possible using custom number formatting in BIRT 2.3.1?
Re: Number formatting in BIRT 2.3.1 [message #552009 is a reply to message #551885] Tue, 10 August 2010 14:12 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

BIRT has number formatting and can also call java classes if you want to
do something different than the default. I tried with the pattern you
posted and it did not come out like you needed. Can you produce what
you need with Java number formatting?

Jason

On 8/9/2010 8:17 PM, Amit Bhargava wrote:
> Hi all,
>
> Am trying to get some numeric data in the following format
>
> ##,##,###.00
> In other words, the 3 least significant digits need to be together and
> grouping is of every 2 digits after that.
> eg: 12,12,223.45
>
> Is this possible using custom number formatting in BIRT 2.3.1?
Re: Number formatting in BIRT 2.3.1 [message #552642 is a reply to message #552009] Fri, 13 August 2010 02:39 Go to previous messageGo to next message
Amit Bhargava is currently offline Amit BhargavaFriend
Messages: 4
Registered: August 2010
Junior Member
Thanks for the reply, Jason. It turned out the normal formatting was sufficient for our purposes.

Just in case, could you please give me an example of how a custom Java class would be called to provide formatting?

Thanks
Re: Number formatting in BIRT 2.3.1 [message #552819 is a reply to message #552642] Fri, 13 August 2010 15:59 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

You can import any class that is in the classpath. For example suppose
I wanted to format dates a different way. I could do this in script or
an expression like:

var mydt1 =params["date1"].value
var mydt2 =params["date2"].value

importPackage( Packages.java.text );
var sdf = new SimpleDateFormat("MMM d, yyyy");
var mydtf1 = sdf.format( mydt1 );
var mydtf2 = sdf.format( mydt2 );
mydtf1 + "-" + mydtf2

Jason

On 8/12/2010 10:39 PM, Amit Bhargava wrote:
> Thanks for the reply, Jason. It turned out the normal formatting was
> sufficient for our purposes.
> Just in case, could you please give me an example of how a custom Java
> class would be called to provide formatting?
>
> Thanks
Previous Topic:subtotals for multipage tables
Next Topic:Multiple Charts on a Canvas
Goto Forum:
  


Current Time: Thu Mar 28 21:40:26 GMT 2024

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

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

Back to the top