Home Analytics Designing reports
The community of Analytics developers are invited to follow and participate in the developer network.
OpenText technical experts collaborate with supported customers and partners in the Magellan product area.

number to string conversion appending , example 2018 shown as 2,018

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?

Comments

  • please see attached report to see problem
  • 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.
    Regards,
    Jeff F.
    Sr. Technical Support Specialist
    OpenText
  • 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?

  • 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..



    Regards,
    Jeff F.
    Sr. Technical Support Specialist
    OpenText
Sign In or Register to comment.