Chart XAxis DataLabelsColumn display problem Part2

Thread is closed for posting
2 posts, 0 answers
  1. Phil Borland
    Phil Borland avatar
    6 posts
    Member since:
    Jan 2006

    Posted 23 Feb 2011 Link to this post

    Following on from this thread:
    http://www.telerik.com/community/forums/aspnet-ajax/chart/chart-xaxis-datalabelscolumn-display-problem.aspx

    There is another Bug Chart XAxis DataLabelsColumn in telerik reports, If you choose a field of type DataTime Type it also wont bind!

    As it wouldnt bind to a field of datetime, the work around I found was to create a Calculated Field Called CompletedDateStr of DataType String, and add an expression to correctly format the date (to the correct locale) in the Telerik Report SQLDataSource.

    ie add this to your SQL datasource
    = Format("{0:d}", Fields.CompletedDate)
  2. Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 28 Feb 2011 Link to this post

    Hi Phil,

    RadChart does not support DateTime values directly. DateTime values should be converted to their OLE Automation equivalents using the ToOADate() method.
    If you want to convert the DateTime values to OADate before extraxting them from the Database you can use the following SQL query:

    "SELECT [Temperature], CAST([Date] AS FLOAT) + 2 as float_date FROM [Table_1]"

    Best wishes,
    Evgenia
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top