This is a migrated thread and some comments may be shown as answers.

Chart XAxis DataLabelsColumn display problem Part2

1 Answer 51 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Phil Borland
Top achievements
Rank 1
Phil Borland asked on 23 Feb 2011, 03:22 PM
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)

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 28 Feb 2011, 12:03 PM
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!
Tags
Chart (Obsolete)
Asked by
Phil Borland
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or