Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Format number depending on the row value
Format number depending on the row value [message #658464] Tue, 08 March 2011 14:51 Go to next message
Nicola is currently offline NicolaFriend
Messages: 184
Registered: July 2009
Senior Member
Hi,
I have a need for formatting a number with N decimal after the comma
depending on the value of another filed in the datarows.
How can I do that=?
I use birt viewer 2.6.0.
Thank you,

Bye
Nicola
Re: Format number depending on the row value [message #658465 is a reply to message #658464] Tue, 08 March 2011 15:08 Go to previous message
Nicola is currently offline NicolaFriend
Messages: 184
Registered: July 2009
Senior Member
Hi,
I found the solution.
Javascript:

importPackage( Packages.java.text );
var df = new DecimalFormat();
df.setMaximumFractionDigits(4);
df.setMinimumFractionDigits(2);
...... write logic.....


Bye
Nicola


nicola ha scritto:
> Hi,
> I have a need for formatting a number with N decimal after the comma
> depending on the value of another filed in the datarows.
> How can I do that=?
> I use birt viewer 2.6.0.
> Thank you,
>
> Bye
> Nicola
Previous Topic:Automatically extracted BIRT FAQs
Next Topic:Problem importing BIRT code in GWT application
Goto Forum:
  


Current Time: Tue Apr 23 10:13:49 GMT 2024

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

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

Back to the top