Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Decimal (calc) on Linux
Elbe
Hi,
I want to display 3 data in my report: A, B et C, with C=A*B.
I call my report on a J2EE application.
I use a XML datasource (but as you can read after, it isn't seem to be the problem), and my numbers are with a coma (for istance: 3,14159 for PI )
A en B are "decimal", and can have 4 digits after the coma.
C is calculed in datasource.
For display data, I use "String" (not better with "decimal" )
When I used "WindowsXP/JDK5/Tomcat5.5", it works, but not in a "Ubuntu/JDK6/Tomcat6".
So, I try to do C=A with A as number (in order to do: *B)
On Ubuntu:
1) With a=1,3456 and A as decimal in XML datasource:
Result= 13,456
(WRONG)
2) With a=1,345 and A as decimal in XML datasource:
Result= 1,345
(CORRECT, but not A*B)
3) With a=1,3456 and A as decimal in XML datasource AND on display:
Result= 13456.0000 (I try many parameter for display numeric)
4) With a=1,3456 and A as string in XML datasource AND on display:
CORRECT but i can't multiply
5) I try to make a function:
parseFloat(row["info_calc::a"].replace(',','.'))
but Result=1.35
(And I don't want to make a function for this ! )
I also try (in java when I call BIRT):
task.setLocale(Locale.FRENCH);
but it doesn't work.
Thanks.
Find more posts tagged with
Comments
There are no comments yet