Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » The right and generic way to format numbers in all reports
The right and generic way to format numbers in all reports [message #1022651] Fri, 22 March 2013 09:43 Go to next message
nari noori is currently offline nari nooriFriend
Messages: 33
Registered: November 2012
Member
Hi,

i am using locale "no_NO" (norwegian) in my birt report viewer.

I want to have a standard and generic way of formatting all the currency numbers in my different reports, whats the best way of doing this ?

I want to format all currency in this format 1.333.222,05 . but in Report Design if i choose Auto as Locale in format number, it shows the standard norwegian format which is: 1,333,234.56

Is it possible to specify a new standard norwegian format for currency in for example: org.eclipse.birt.report.viewer.nl_no_3.5.0.jar ? or somewhere else...

if i put this line in "beforeFactory" it works though, but this doesnt seem the right way:
reportContext.getDesignHandle().setStringProperty("locale","it_IT");

The other way is to choose Format as Currency and Locale as "italian" for every report, but this does not seem like a generic and good way.
Re: The right and generic way to format numbers in all reports [message #1027338 is a reply to message #1022651] Tue, 26 March 2013 21:49 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Have you tried just creating a default style for the data item and using a custom pattern to format the number? If you use the predefined style name it will apply automatically. If you use a different style name you can apply the style to just the currency data items.
Previous Topic:Chart.setScript(String fullClassName) does not work in plugin and RCP applications
Next Topic:Implementation of the zoom in a chart
Goto Forum:
  


Current Time: Wed Apr 24 15:05:34 GMT 2024

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

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

Back to the top