Yonggu Kang
Top achievements
Rank 1
Iron
Yonggu Kang
asked on 28 Sep 2013, 08:40 AM
Hi telerik,
I'm creating a report showing 2 temperature series measured irregular interval which saved in database
but faild to show correctly. I think I might make a mistake to set property properly and looked your document
and threads here ,however, most of all are outdated and even worse,your doc says just 1 short example with
only code which is not suitable for me.
I used RadChart for SL to show dynamic thermo graphs with good success but their setting looks diffrent
with that of report chart.
Would you let me know proper and newest exmaple to show datetime scla graph on report ?
Or give me an advice on attached image what I had make a mistake.
The error message says datetime is out of range which can add or subtract bla bla.
and another is my setting of axis.
My fiedls are : LapTime : datetime ordered by date : x - axis
Thermo : thermo values : y-axis
Thank you in advance.
Kang
I'm creating a report showing 2 temperature series measured irregular interval which saved in database
but faild to show correctly. I think I might make a mistake to set property properly and looked your document
and threads here ,however, most of all are outdated and even worse,your doc says just 1 short example with
only code which is not suitable for me.
I used RadChart for SL to show dynamic thermo graphs with good success but their setting looks diffrent
with that of report chart.
Would you let me know proper and newest exmaple to show datetime scla graph on report ?
Or give me an advice on attached image what I had make a mistake.
The error message says datetime is out of range which can add or subtract bla bla.
and another is my setting of axis.
My fiedls are : LapTime : datetime ordered by date : x - axis
Thermo : thermo values : y-axis
Thank you in advance.
Kang
5 Answers, 1 is accepted
0
Yonggu Kang
Top achievements
Rank 1
Iron
answered on 02 Oct 2013, 01:54 AM
Pls read this and give me an advice.
0
Hello Kang,
It is not clear what are the full settings of your Telerik Reporting Graph item. If you are using a DatetimeScale on the X axis, you need to set the lineSeries X property to the DateTime field in the data. For more details, take a look at the How to: Change the Axis Scale help article.
In case the above suggestion does not help you, please post the designer's generated code for the Graph item, so we can check its settings. Feel free to open a support ticket and send us your details in it.
Regards,
Stef
Telerik
It is not clear what are the full settings of your Telerik Reporting Graph item. If you are using a DatetimeScale on the X axis, you need to set the lineSeries X property to the DateTime field in the data. For more details, take a look at the How to: Change the Axis Scale help article.
In case the above suggestion does not help you, please post the designer's generated code for the Graph item, so we can check its settings. Feel free to open a support ticket and send us your details in it.
Regards,
Stef
Telerik
Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.
0
Yonggu Kang
Top achievements
Rank 1
Iron
answered on 05 Oct 2013, 10:13 AM
Hi, telerik,
Followings are the designer code.Hope this helps.
It's hard for me to set proper properties in proper places,THE BASIC THINGS.
I already read your document but still hesitate.
Most simple sample or picture is the most helpful to me.
Thank you in advance.
Kang
Followings are the designer code.Hope this helps.
It's hard for me to set proper properties in proper places,THE BASIC THINGS.
I already read your document but still hesitate.
Most simple sample or picture is the most helpful to me.
Thank you in advance.
Kang
//
// graph1
//
this.graph1.CoordinateSystems.Add(this.cartesianCoordinateSystem1);
this.graph1.DataSource = this.objectDataSource2;
this.graph1.Legend.Position = Telerik.Reporting.GraphItemPosition.TopCenter;
this.graph1.Legend.Style.LineColor = System.Drawing.Color.LightGray;
this.graph1.Legend.Style.LineWidth = Telerik.Reporting.Drawing.Unit.Cm(0D);
this.graph1.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Cm(0.19246603548526764D), Telerik.Reporting.Drawing.Unit.Cm(0D));
this.graph1.Name = "graph1";
this.graph1.PlotAreaStyle.LineColor = System.Drawing.Color.LightGray;
this.graph1.PlotAreaStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Cm(0D);
this.graph1.Series.Add(this.lineSeries1);
graphGroup3.Groupings.Add(new Telerik.Reporting.Grouping("=Fields.TagName"));
graphGroup3.Name = "tagTypeGroup";
graphGroup3.Sortings.Add(new Telerik.Reporting.Sorting("=Fields.TagName", Telerik.Reporting.SortDirection.Asc));
this.graph1.SeriesGroups.Add(graphGroup3);
this.graph1.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Cm(16.508138656616211D), Telerik.Reporting.Drawing.Unit.Cm(8.9998989105224609D));
this.graph1.Style.Padding.Bottom = Telerik.Reporting.Drawing.Unit.Pixel(10D);
this.graph1.Style.Padding.Left = Telerik.Reporting.Drawing.Unit.Pixel(10D);
this.graph1.Style.Padding.Right = Telerik.Reporting.Drawing.Unit.Pixel(10D);
this.graph1.Style.Padding.Top = Telerik.Reporting.Drawing.Unit.Pixel(10D);
graphTitle1.Position = Telerik.Reporting.GraphItemPosition.TopCenter;
graphTitle1.Style.LineColor = System.Drawing.Color.LightGray;
graphTitle1.Style.LineWidth = Telerik.Reporting.Drawing.Unit.Cm(0D);
graphTitle1.Text = "시간별 온도";
this.graph1.Titles.Add(graphTitle1);
//
// cartesianCoordinateSystem1
//
this.cartesianCoordinateSystem1.Name = "cartesianCoordinateSystem1";
this.cartesianCoordinateSystem1.XAxis = this.graphAxis2;
this.cartesianCoordinateSystem1.YAxis = this.graphAxis1;
//
// graphAxis2
//
this.graphAxis2.LabelFormat = "{0:mm:ss}";
this.graphAxis2.MajorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
this.graphAxis2.MajorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
this.graphAxis2.MinorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
this.graphAxis2.MinorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
this.graphAxis2.MinorGridLineStyle.Visible = false;
this.graphAxis2.Name = "graphAxis2";
dateTimeScale1.MajorUnit = Telerik.Reporting.DateTimeScaleUnits.Minutes;
this.graphAxis2.Scale = dateTimeScale1;
this.graphAxis2.Title = "sec";
this.graphAxis2.TitlePlacement = Telerik.Reporting.GraphAxisTitlePlacement.AtMaximum;
//
// graphAxis1
//
this.graphAxis1.MajorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
this.graphAxis1.MajorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
this.graphAxis1.MinorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
this.graphAxis1.MinorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
this.graphAxis1.MinorGridLineStyle.Visible = false;
this.graphAxis1.Name = "graphAxis1";
numericalScale1.MajorStep = 5D;
this.graphAxis1.Scale = numericalScale1;
this.graphAxis1.Title = "온도";
this.graphAxis1.TitlePlacement = Telerik.Reporting.GraphAxisTitlePlacement.AtMaximum;
//
// objectDataSource2
//
this.objectDataSource2.DataMember = "NewThermoGraphInfoList";
this.objectDataSource2.DataSource = "SYR.Business.Pop.ThermoGraphInfoList, SYR.Business.Pop, Version=1.0.0.0, Culture=" +
"neutral, PublicKeyToken=null";
this.objectDataSource2.Name = "objectDataSource2";
//
// lineSeries1
//
graphGroup1.Groupings.Add(new Telerik.Reporting.Grouping("=Fields.LapTime"));
graphGroup1.Name = "lapSecondsGroup";
graphGroup1.Sortings.Add(new Telerik.Reporting.Sorting("=Fields.LapTime", Telerik.Reporting.SortDirection.Asc));
this.lineSeries1.CategoryGroup = graphGroup1;
this.lineSeries1.CoordinateSystem = this.cartesianCoordinateSystem1;
this.lineSeries1.DataPointLabel = "=Sum(Fields.Thermo)";
this.lineSeries1.DataPointLabelStyle.Visible = false;
this.lineSeries1.DataPointStyle.Visible = false;
this.lineSeries1.Legend = "= Fields.TagName";
this.lineSeries1.LegendFormat = "";
this.lineSeries1.LineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
this.lineSeries1.MarkerMaxSize = Telerik.Reporting.Drawing.Unit.Pixel(50D);
this.lineSeries1.MarkerMinSize = Telerik.Reporting.Drawing.Unit.Pixel(5D);
this.lineSeries1.MarkerSize = Telerik.Reporting.Drawing.Unit.Pixel(5D);
graphGroup2.Groupings.Add(new Telerik.Reporting.Grouping("=Fields.TagName"));
graphGroup2.Name = "tagTypeGroup";
graphGroup2.Sortings.Add(new Telerik.Reporting.Sorting("=Fields.TagName", Telerik.Reporting.SortDirection.Asc));
this.lineSeries1.SeriesGroup = graphGroup2;
this.lineSeries1.Size = null;
this.lineSeries1.X = "= Fields.LapTime";
this.lineSeries1.Y = "=Sum(Fields.Thermo)";
//
// objectDataSource1
//
this.objectDataSource1.DataMember = "Datas";
this.objectDataSource1.DataSource = "SYR.Report.Libs.ProdStdEntityCollection, SYR.Report.Libs, Version=1.0.0.0, Cultur" +
"e=neutral, PublicKeyToken=null";
this.objectDataSource1.Name = "objectDataSource1";
0
Accepted
Hi Kang,
In your code snippet there is an extra GraphGroup for the series, and the GraphGroup assigned as LineSeries.CategoryGroup is not actually added to the Grapg.CategoryGroups collection. Here is the code we tested with:
Notice you can test your dynamic reports by importing them in the Standalone Designer and using test data - TestReport.zip. This is an easy way to check the applied settings using the Property grid.
Regards,
Stef
Telerik
In your code snippet there is an extra GraphGroup for the series, and the GraphGroup assigned as LineSeries.CategoryGroup is not actually added to the Grapg.CategoryGroups collection. Here is the code we tested with:
public
Report1()
{
//
// Required for telerik Reporting designer support
//
InitializeComponent();
var table =
new
DataTable();
table.Columns.Add(
"TagName"
);
table.Columns.Add(
"LapTime"
,
typeof
(DateTime));
table.Columns.Add(
"Thermo"
,
typeof
(
int
));
table.Rows.Add(
"tag1"
, DateTime.Now, 10);
table.Rows.Add(
"tag1"
, DateTime.Now.AddMinutes(2), 5);
table.Rows.Add(
"tag1"
, DateTime.Now.AddMinutes(3), 20);
table.Rows.Add(
"tag2"
, DateTime.Now.AddMinutes(2), 14);
table.Rows.Add(
"tag2"
, DateTime.Now.AddMinutes(3), 4);
table.Rows.Add(
"tag2"
, DateTime.Now.AddMinutes(6), 10);
//
// graph1
//
var graph1 =
new
Telerik.Reporting.Graph();
graph1.DataSource = table;
var graphGroup1 =
new
GraphGroup();
var graphGroup3 =
new
GraphGroup();
var lineSeries1 =
new
LineSeries();
var cartesianCoordinateSystem1 =
new
CartesianCoordinateSystem();
var graphTitle1 =
new
GraphTitle();
var graphAxis1 =
new
GraphAxis();
var graphAxis2 =
new
GraphAxis();
var objectDataSource1 =
new
ObjectDataSource();
var dateTimeScale1 =
new
DateTimeScale();
var numericalScale1 =
new
NumericalScale();
graph1.CoordinateSystems.Add(cartesianCoordinateSystem1);
graph1.Legend.Position = Telerik.Reporting.GraphItemPosition.TopCenter;
graph1.Legend.Style.LineColor = System.Drawing.Color.LightGray;
graph1.Legend.Style.LineWidth = Telerik.Reporting.Drawing.Unit.Cm(0D);
graph1.Location =
new
Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Cm(0.19246603548526764D), Telerik.Reporting.Drawing.Unit.Cm(0D));
graph1.Name =
"graph1"
;
graph1.PlotAreaStyle.LineColor = System.Drawing.Color.LightGray;
graph1.PlotAreaStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Cm(0D);
graph1.Series.Add(lineSeries1);
graphGroup3.Groupings.Add(
new
Telerik.Reporting.Grouping(
"=Fields.TagName"
));
graphGroup3.Name =
"tagTypeGroup"
;
graphGroup3.Sortings.Add(
new
Telerik.Reporting.Sorting(
"=Fields.TagName"
, Telerik.Reporting.SortDirection.Asc));
graph1.SeriesGroups.Add(graphGroup3);
graph1.Size =
new
Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Cm(10.508138656616211D), Telerik.Reporting.Drawing.Unit.Cm(8.9998989105224609D));
graph1.Style.Padding.Bottom = Telerik.Reporting.Drawing.Unit.Pixel(10D);
graph1.Style.Padding.Left = Telerik.Reporting.Drawing.Unit.Pixel(10D);
graph1.Style.Padding.Right = Telerik.Reporting.Drawing.Unit.Pixel(10D);
graph1.Style.Padding.Top = Telerik.Reporting.Drawing.Unit.Pixel(10D);
graphTitle1.Position = Telerik.Reporting.GraphItemPosition.TopCenter;
graphTitle1.Style.LineColor = System.Drawing.Color.LightGray;
graphTitle1.Style.LineWidth = Telerik.Reporting.Drawing.Unit.Cm(0D);
graphTitle1.Text =
"시간별 온도"
;
graph1.Titles.Add(graphTitle1);
//
// cartesianCoordinateSystem1
//
cartesianCoordinateSystem1.Name =
"cartesianCoordinateSystem1"
;
cartesianCoordinateSystem1.XAxis = graphAxis2;
cartesianCoordinateSystem1.YAxis = graphAxis1;
//
// graphAxis2
//
graphAxis2.LabelFormat =
"{0:mm:ss}"
;
graphAxis2.MajorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
graphAxis2.MajorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
graphAxis2.MinorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
graphAxis2.MinorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
graphAxis2.MinorGridLineStyle.Visible =
false
;
graphAxis2.Name =
"graphAxis2"
;
dateTimeScale1.MajorUnit = Telerik.Reporting.DateTimeScaleUnits.Minutes;
graphAxis2.Scale = dateTimeScale1;
graphAxis2.Title =
"sec"
;
graphAxis2.TitlePlacement = Telerik.Reporting.GraphAxisTitlePlacement.AtMaximum;
//
// graphAxis1
//
graphAxis1.MajorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
graphAxis1.MajorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
graphAxis1.MinorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
graphAxis1.MinorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
graphAxis1.MinorGridLineStyle.Visible =
false
;
graphAxis1.Name =
"graphAxis1"
;
numericalScale1.MajorStep = 5D;
graphAxis1.Scale = numericalScale1;
graphAxis1.Title =
"온도"
;
graphAxis1.TitlePlacement = Telerik.Reporting.GraphAxisTitlePlacement.AtMaximum;
//
// lineSeries1
//
graphGroup1.Groupings.Add(
new
Telerik.Reporting.Grouping(
"=Fields.LapTime"
));
graphGroup1.Name =
"lapSecondsGroup"
;
graphGroup1.Sortings.Add(
new
Telerik.Reporting.Sorting(
"=Fields.LapTime"
, Telerik.Reporting.SortDirection.Asc));
graph1.CategoryGroups.Add(graphGroup1);
lineSeries1.CategoryGroup = graphGroup1;
lineSeries1.CoordinateSystem = cartesianCoordinateSystem1;
lineSeries1.DataPointLabel =
"=Sum(Fields.Thermo)"
;
lineSeries1.DataPointLabelStyle.Visible =
false
;
lineSeries1.DataPointStyle.Visible =
false
;
lineSeries1.Legend =
"= Fields.TagName"
;
lineSeries1.LegendFormat =
""
;
lineSeries1.LineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
lineSeries1.MarkerMaxSize = Telerik.Reporting.Drawing.Unit.Pixel(50D);
lineSeries1.MarkerMinSize = Telerik.Reporting.Drawing.Unit.Pixel(5D);
lineSeries1.MarkerSize = Telerik.Reporting.Drawing.Unit.Pixel(5D);
lineSeries1.SeriesGroup = graphGroup3;
lineSeries1.Size =
null
;
lineSeries1.X =
"= Fields.LapTime"
;
lineSeries1.Y =
"=Sum(Fields.Thermo)"
;
//
// TODO: Add any constructor code after InitializeComponent call
//
this
.detail.Items.Add(graph1);
}
Notice you can test your dynamic reports by importing them in the Standalone Designer and using test data - TestReport.zip. This is an easy way to check the applied settings using the Property grid.
Regards,
Stef
Telerik
Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.
0
Yonggu Kang
Top achievements
Rank 1
Iron
answered on 14 Oct 2013, 01:46 PM
Hi,Stef,
Thank you for your kind info and sharing your valuable time.
It helps me a lot,however I feel still short of my implementaion.
I think I have to take more time what is better to display.
TIA.
RGDS
Kang
Thank you for your kind info and sharing your valuable time.
It helps me a lot,however I feel still short of my implementaion.
I think I have to take more time what is better to display.
TIA.
RGDS
Kang