Home
Analytics
number to string conversion appending , example 2018 shown as 2,018
Venu_Bachwale
I have data set, query returns year, month, day (all these are integer in database). I am creating dataCube for drilldown
but very first time, year shows as 2,018
To replicate this I created sample inline data in attached report, last third chart shows year as 2,018
Then I added computed column comp_year on year that convert integer to year and show 2,018
WHy, BIRT is introducting ,?
how I can avoid this , character?
Find more posts tagged with
Comments
Venu_Bachwale
please see attached report to see problem
jfranken
Hi Venu,
Sorry for the slow responses to forum posts. I have not had much time to look at the forums this week. I think you can fix this issue by changing the year to integer data type in the data cube. Then refresh the chart bindings.
Venu_Bachwale
yes, we can change data type in cube bindings and levels definition as integer.... but it gives another problem in drill-down....
month automatically changed to integer and sort is wrong example 1,2,6,10,11,12 were shown as 1,10,11,12,6 (after locale it shows Jan,Oct,Nov,Dec,Jun)
My second point was, even in DataSet previe comp_year_str(yearInt) showing 2,018; how I can avoid it?
jfranken
The comma is added in the data set preview because it is localized:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=190229
If you want the column to be a string without a comma, you need to add code like: row["year"].toString().replace(/[,]+/g, '')
To fix the Category Axis sorting, add a sort expression in the chart editor using the icon to the right of the Category Axis data expression..