private Tuple <Report, Graph> SetReportDetails(Report report) { var detail = new Telerik.Reporting.DetailSection(); detail.Height = Telerik.Reporting.Drawing.Unit.Cm(0.5); detail.Name = "detail"; ReportStyles.SetReportDetailStyle(detail.Style); report.Items.Add(detail); var graph = new Graph(); graph.Name = "graph1"; graph.Width = reportWidth; graph.Height = report.PageSettings.PaperSize.Height / 2; //reportWidth = report.Width; detail.Items.Add(graph); graph.Legend.Width = Unit.Cm(5); graph.Legend.Style.LineColor = System.Drawing.Color.LightGray; graph.Legend.Style.LineWidth = Telerik.Reporting.Drawing.Unit.Inch(0D); graph.PlotAreaStyle.LineColor = System.Drawing.Color.LightGray; graph.PlotAreaStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Inch(0D); //graph.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(6D), Telerik.Reporting.Drawing.Unit.Inch(3D)); CategoryScale categoryScale1 = new CategoryScale(); categoryScale1.PositionMode = Telerik.Reporting.AxisPositionMode.OnTicks; categoryScale1.SpacingSlotCount = 0D; GraphAxis categoryAxis = new GraphAxis(); GraphAxis valueAxis = new GraphAxis(); var polarCoordinateSystem = new PolarCoordinateSystem(); polarCoordinateSystem.AngularAxis = valueAxis; polarCoordinateSystem.RadialAxis = categoryAxis; graph.CoordinateSystems.Add(polarCoordinateSystem); categoryAxis.MajorGridLineStyle.LineColor = System.Drawing.Color.LightGray; categoryAxis.MajorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D); categoryAxis.MajorGridLineStyle.Visible = false; categoryAxis.MinorGridLineStyle.LineColor = System.Drawing.Color.LightGray; categoryAxis.MinorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D); categoryAxis.MinorGridLineStyle.Visible = false; categoryAxis.Name = "graphAxis2"; categoryScale1.PositionMode = Telerik.Reporting.AxisPositionMode.OnTicks; categoryScale1.SpacingSlotCount = 0D; categoryAxis.Scale = categoryScale1; categoryAxis.Style.Visible = false; valueAxis.MajorGridLineStyle.LineColor = System.Drawing.Color.LightGray; valueAxis.MajorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D); valueAxis.MajorGridLineStyle.Visible = false; valueAxis.MinorGridLineStyle.LineColor = System.Drawing.Color.LightGray; valueAxis.MinorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D); valueAxis.MinorGridLineStyle.Visible = false; valueAxis.Name = "graphAxis1"; valueAxis.Scale = new NumericalScale();; valueAxis.Style.Visible = false; var valuecolumn = ChartReportReportDTO.EntityChartReportValues.First(); var categoryGroup = new GraphGroup(); //categoryGroup.Groupings.Add(new Grouping()); graph.CategoryGroups.Add(categoryGroup); //if(ChartReportReportDTO.EntityChartReportSeries.Count>0) //{ //} var column = ChartReportReportDTO.EntityChartReportSeries.First(); var barSeries = new Telerik.Reporting.BarSeries(); graph.Series.Add(barSeries); barSeries.Name = column.EntityListViewColumn.RelativeColumnName; barSeries.CategoryGroup = categoryGroup; barSeries.ToolTip.Text = string.Format("= Format('{0}', {1}(Fields.{2}) / CDbl(Exec(\'graph1\', {1}(Fields.{2}))))", "{0:P}", valuecolumn.FunctionType.ToString(), valuecolumn.EntityListViewColumn.RelativeColumnName); barSeries.X = string.Format("= {0}(Fields.{1})", valuecolumn.FunctionType.ToString(), valuecolumn.EntityListViewColumn.RelativeColumnName); var serieGroup = new GraphGroup(); barSeries.SeriesGroup = serieGroup; //اگر نام ست نشده باشد گزارش درست کار نمیکند!!!!؟ serieGroup.Name = column.EntityListViewColumn.RelativeColumnName; serieGroup.Groupings.Add(new Telerik.Reporting.Grouping(string.Format("= Fields.{0}", column.EntityListViewColumn.RelativeColumnName))); serieGroup.Sortings.Add(new Telerik.Reporting.Sorting(string.Format("= Fields.{0}", column.EntityListViewColumn.RelativeColumnName), Telerik.Reporting.SortDirection.Asc)); graph.SeriesGroups.Add(serieGroup); //رو بقیه انواع خطا میدهد!اشکال تلریک هست در ورژن جدیدتر چک شود //شاید هم چون اصلا کتگوری ندارد و فقط سری دارد قانونش همینه barSeries.ArrangeMode = Telerik.Reporting.GraphSeriesArrangeMode.Stacked100; barSeries.CoordinateSystem = polarCoordinateSystem; barSeries.DataPointLabel = string.Format("= {0}(Fields.{1}) / CDbl(Exec(\'graph1\', {0}(Fields.{1})))", valuecolumn.FunctionType.ToString(), valuecolumn.EntityListViewColumn.RelativeColumnName); barSeries.DataPointLabelAlignment = Telerik.Reporting.BarDataPointLabelAlignment.OutsideColumn; barSeries.DataPointLabelConnectorStyle.Padding.Bottom = Telerik.Reporting.Drawing.Unit.Point(2D); barSeries.DataPointLabelConnectorStyle.Padding.Top = Telerik.Reporting.Drawing.Unit.Point(2D); barSeries.DataPointLabelFormat = "{0:P}"; barSeries.DataPointLabelOffset = Telerik.Reporting.Drawing.Unit.Mm(5D); barSeries.DataPointLabelStyle.Visible = true; barSeries.DataPointStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Inch(0D); barSeries.DataPointStyle.Visible = true; barSeries.LegendItem.Value = string.Format("= Fields.{0}", column.EntityListViewColumn.RelativeColumnName); var legendValue = string.Format("= Fields.{0}", column.EntityListViewColumn.RelativeColumnName); var parentGeoup = serieGroup; foreach (var cColumn in ChartReportReportDTO.EntityChartReportSeries.Where(x => x != column)) { var newGroup = new GraphGroup(); newGroup.Name = column.EntityListViewColumn.RelativeColumnName; newGroup.Groupings.Add(new Telerik.Reporting.Grouping(string.Format("= Fields.{0}", cColumn.EntityListViewColumn.RelativeColumnName))); newGroup.Sortings.Add(new Telerik.Reporting.Sorting(string.Format("= Fields.{0}", cColumn.EntityListViewColumn.RelativeColumnName), Telerik.Reporting.SortDirection.Asc)); parentGeoup.ChildGroups.Add(newGroup); barSeries.SeriesGroup = newGroup; parentGeoup = newGroup; legendValue += "+ \'/\' +" + string.Format(" Fields.{0}", cColumn.EntityListViewColumn.RelativeColumnName); } barSeries.LegendItem.Value = legendValue; barSeries.ToolTip.Title = legendValue; return(new Tuple <Report, Graph>(report, graph)); }
//private List<ColumnSizeLocation> GetColumnsSizeLocation() //{ // List<ColumnSizeLocation> result = new List<ColumnSizeLocation>(); // int widthUnits = 0; // var columns = ChartReportReportDTO.EntityListView.EntityListViewAllColumns.Where(x => x.RelationshipTailID == 0); // foreach (var column in columns) // { // widthUnits += (column.WidthUnit == 0 ? 1 : column.WidthUnit); // } // var width = reportWidth; // var perUnitWidth = width.Divide(widthUnits); // var consumedWidthUnits = 0; // if (ReportGroups != null) // foreach (var reportGroup in ReportGroups) // { // ColumnSizeLocation columnSizeLocation = new ColumnSizeLocation(); // columnSizeLocation.LictViewColumnID = reportGroup.ListViewColumnID; // SetColumnSizePosition(columnSizeLocation, reportGroup.EntityListViewColumn.WidthUnit, ref consumedWidthUnits, perUnitWidth); // result.Add(columnSizeLocation); // } // foreach (var column in columns) // { // if (!result.Any(x => x.LictViewColumnID == column.ID)) // { // ColumnSizeLocation columnSizeLocation = new ColumnSizeLocation(); // columnSizeLocation.LictViewColumnID = column.ID; // SetColumnSizePosition(columnSizeLocation, column.WidthUnit, ref consumedWidthUnits, perUnitWidth); // result.Add(columnSizeLocation); // } // } // return result; //} //private void SetColumnSizePosition(ColumnSizeLocation columnSizeLocation, int currentWidthUnits, ref int consumedWidthUnits, Unit perUnitWidth) //{ // if (currentWidthUnits == 0) // currentWidthUnits = 1; // var width = currentWidthUnits * perUnitWidth; // columnSizeLocation.Width = width; // var xlocation = (reportWidth - width) - consumedWidthUnits * perUnitWidth; // columnSizeLocation.XLocation = xlocation; // consumedWidthUnits += currentWidthUnits; //} private Tuple <Report, Graph> SetReportDetails(Report report) { var detail = new Telerik.Reporting.DetailSection(); detail.Height = Telerik.Reporting.Drawing.Unit.Cm(0.5); detail.Name = "detail"; ReportStyles.SetReportDetailStyle(detail.Style); report.Items.Add(detail); var graph = new Graph(); graph.Width = reportWidth; graph.Height = report.PageSettings.PaperSize.Height / 2; //reportWidth = report.Width; detail.Items.Add(graph); graph.Legend.Width = Unit.Cm(3); graph.Legend.Style.LineColor = System.Drawing.Color.LightGray; graph.Legend.Style.LineWidth = Telerik.Reporting.Drawing.Unit.Inch(0D); graph.PlotAreaStyle.LineColor = System.Drawing.Color.LightGray; graph.PlotAreaStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Inch(0D); //graph.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(6D), Telerik.Reporting.Drawing.Unit.Inch(3D)); GraphAxis categoryAxis = new GraphAxis(); categoryAxis.MajorGridLineStyle.LineColor = System.Drawing.Color.LightGray; categoryAxis.MajorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D); categoryAxis.MinorGridLineStyle.LineColor = System.Drawing.Color.LightGray; categoryAxis.MinorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D); categoryAxis.MinorGridLineStyle.Visible = false; categoryAxis.Scale = new CategoryScale(); GraphAxis valueAxis = new GraphAxis(); valueAxis.MajorGridLineStyle.LineColor = System.Drawing.Color.LightGray; valueAxis.MajorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D); valueAxis.MinorGridLineStyle.LineColor = System.Drawing.Color.LightGray; valueAxis.MinorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D); valueAxis.MinorGridLineStyle.Visible = false; valueAxis.Scale = new NumericalScale(); var cartesianCoordinateSystem1 = new CartesianCoordinateSystem(); cartesianCoordinateSystem1.Name = "cartesianCoordinateSystem1"; cartesianCoordinateSystem1.XAxis = categoryAxis; cartesianCoordinateSystem1.YAxis = valueAxis; graph.CoordinateSystems.Add(cartesianCoordinateSystem1); var categoryColumn = ChartReportReportDTO.EntityChartReportCategories.First(); var categoryGroup = new GraphGroup(); categoryGroup.Name = categoryColumn.EntityListViewColumn.RelativeColumnName; categoryGroup.Groupings.Add(new Grouping(string.Format("= Fields.{0}", categoryColumn.EntityListViewColumn.RelativeColumnName))); categoryGroup.Sortings.Add(new Telerik.Reporting.Sorting(string.Format("= Fields.{0}", categoryColumn.EntityListViewColumn.RelativeColumnName), Telerik.Reporting.SortDirection.Asc)); graph.CategoryGroups.Add(categoryGroup); foreach (var column in ChartReportReportDTO.EntityChartReportSeries) { foreach (var valuecolumn in ChartReportReportDTO.EntityChartReportValues) { var barSeries = new Telerik.Reporting.BarSeries(); //if (column.EntityListViewColumnID == categoryColumn.EntityListViewColumnID) // barSeries.ArrangeMode = GraphSeriesArrangeMode.Overlapped; //else //{ if (column.ArrangeType == ChartSerieArrangeType.Clustered) { barSeries.ArrangeMode = GraphSeriesArrangeMode.Clustered; } else if (column.ArrangeType == ChartSerieArrangeType.Overlapped) { barSeries.ArrangeMode = GraphSeriesArrangeMode.Overlapped; } else if (column.ArrangeType == ChartSerieArrangeType.Stacked) { barSeries.ArrangeMode = GraphSeriesArrangeMode.Stacked; } else if (column.ArrangeType == ChartSerieArrangeType.Stacked100) { barSeries.ArrangeMode = GraphSeriesArrangeMode.Stacked100; } //} barSeries.ToolTip.Text = string.Format("= {0}(Fields.{1})", valuecolumn.FunctionType.ToString(), valuecolumn.EntityListViewColumn.RelativeColumnName); barSeries.ToolTip.Title = string.Format("= Fields.{0}", column.EntityListViewColumn.RelativeColumnName); barSeries.Y = string.Format("= {0}(Fields.{1})", valuecolumn.FunctionType.ToString(), valuecolumn.EntityListViewColumn.RelativeColumnName); //categoryGroup.Groupings.Add(new Telerik.Reporting.Grouping()); //ChartSeries var serieGroup = new GraphGroup(); serieGroup.Name = column.EntityListViewColumn.RelativeColumnName; serieGroup.Groupings.Add(new Telerik.Reporting.Grouping(string.Format("= Fields.{0}", column.EntityListViewColumn.RelativeColumnName))); serieGroup.Sortings.Add(new Telerik.Reporting.Sorting(string.Format("= Fields.{0}", column.EntityListViewColumn.RelativeColumnName), Telerik.Reporting.SortDirection.Asc)); graph.SeriesGroups.Add(serieGroup); barSeries.SeriesGroup = serieGroup; barSeries.CategoryGroup = categoryGroup; barSeries.CoordinateSystem = cartesianCoordinateSystem1; barSeries.DataPointLabel = string.Format("= {0}(Fields.{1})", valuecolumn.FunctionType.ToString(), valuecolumn.EntityListViewColumn.RelativeColumnName); barSeries.DataPointLabelStyle.Visible = true; barSeries.DataPointStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Cm(0); barSeries.DataPointStyle.Visible = true; barSeries.LegendItem.Value = string.Format("= Fields.{0}", column.EntityListViewColumn.RelativeColumnName); graph.Series.Add(barSeries); } } return(new Tuple <Report, Graph>(report, graph)); }
//private List<ColumnSizeLocation> GetColumnsSizeLocation() //{ // List<ColumnSizeLocation> result = new List<ColumnSizeLocation>(); // int widthUnits = 0; // var columns = ChartReportReportDTO.EntityListView.EntityListViewAllColumns.Where(x => x.RelationshipTailID == 0); // foreach (var column in columns) // { // widthUnits += (column.WidthUnit == 0 ? 1 : column.WidthUnit); // } // var width = reportWidth; // var perUnitWidth = width.Divide(widthUnits); // var consumedWidthUnits = 0; // if (ReportGroups != null) // foreach (var reportGroup in ReportGroups) // { // ColumnSizeLocation columnSizeLocation = new ColumnSizeLocation(); // columnSizeLocation.LictViewColumnID = reportGroup.ListViewColumnID; // SetColumnSizePosition(columnSizeLocation, reportGroup.EntityListViewColumn.WidthUnit, ref consumedWidthUnits, perUnitWidth); // result.Add(columnSizeLocation); // } // foreach (var column in columns) // { // if (!result.Any(x => x.LictViewColumnID == column.ID)) // { // ColumnSizeLocation columnSizeLocation = new ColumnSizeLocation(); // columnSizeLocation.LictViewColumnID = column.ID; // SetColumnSizePosition(columnSizeLocation, column.WidthUnit, ref consumedWidthUnits, perUnitWidth); // result.Add(columnSizeLocation); // } // } // return result; //} //private void SetColumnSizePosition(ColumnSizeLocation columnSizeLocation, int currentWidthUnits, ref int consumedWidthUnits, Unit perUnitWidth) //{ // if (currentWidthUnits == 0) // currentWidthUnits = 1; // var width = currentWidthUnits * perUnitWidth; // columnSizeLocation.Width = width; // var xlocation = (reportWidth - width) - consumedWidthUnits * perUnitWidth; // columnSizeLocation.XLocation = xlocation; // consumedWidthUnits += currentWidthUnits; //} // private Telerik.Reporting.DetailSection detailSection1; // private Telerik.Reporting.Graph graph1; //private Telerik.Reporting.PolarCoordinateSystem polarCoordinateSystem1; //private Telerik.Reporting.GraphAxis graphAxis1; //private Telerik.Reporting.GraphAxis graphAxis2; //private Telerik.Reporting.BarSeries barSeries1; private Tuple <Report, Graph> SetReportDetails(Report report) { var detail = new Telerik.Reporting.DetailSection(); //detail.Height = Telerik.Reporting.Drawing.Unit.Cm(0.5); detail.Name = "detail"; ReportStyles.SetReportDetailStyle(detail.Style); report.Items.Add(detail); var graph = new Graph(); graph.Name = "graph1"; graph.Width = reportWidth; graph.Height = report.PageSettings.PaperSize.Height / 2; //reportWidth = report.Width; detail.Items.Add(graph); graph.Legend.Width = Unit.Cm(4); graph.Legend.Style.LineColor = System.Drawing.Color.LightGray; graph.Legend.Style.LineWidth = Telerik.Reporting.Drawing.Unit.Inch(0D); graph.PlotAreaStyle.LineColor = System.Drawing.Color.LightGray; graph.PlotAreaStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Inch(0D); //graph.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(6D), Telerik.Reporting.Drawing.Unit.Inch(3D)); GraphAxis categoryAxis = new GraphAxis(); GraphAxis valueAxis = new GraphAxis(); CategoryScale categoryScale1 = new CategoryScale(); categoryAxis.LabelPlacement = Telerik.Reporting.GraphAxisLabelPlacement.AtMaximum; categoryAxis.MajorGridLineStyle.LineColor = System.Drawing.Color.LightGray; categoryAxis.MajorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D); categoryAxis.MajorGridLineStyle.Visible = true; categoryAxis.MinorGridLineStyle.LineColor = System.Drawing.Color.LightGray; categoryAxis.MinorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D); categoryAxis.MinorGridLineStyle.Visible = false; categoryAxis.Name = "categoryAxis"; //categoryScale1.PositionMode = Telerik.Reporting.AxisPositionMode.OnTicks; categoryScale1.SpacingSlotCount = 0.1D; categoryAxis.Style.LineWidth = Telerik.Reporting.Drawing.Unit.Inch(0D); categoryAxis.Scale = categoryScale1; categoryAxis.Style.Visible = true; valueAxis.LabelAngle = 90; valueAxis.MajorGridLineStyle.LineColor = System.Drawing.Color.LightGray; valueAxis.MajorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D); valueAxis.MajorGridLineStyle.Visible = true; valueAxis.MinorGridLineStyle.LineColor = System.Drawing.Color.LightGray; valueAxis.MinorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D); valueAxis.MinorGridLineStyle.Visible = false; valueAxis.Name = "valueAxis"; NumericalScaleCrossAxisPosition numericalScaleCrossAxisPosition1 = new NumericalScaleCrossAxisPosition(); numericalScaleCrossAxisPosition1.Position = Telerik.Reporting.GraphScaleCrossAxisPosition.AtMinimum; numericalScaleCrossAxisPosition1.Value = 0D; NumericalScale numericalScale1 = new NumericalScale(); numericalScale1.CrossAxisPositions.Add(numericalScaleCrossAxisPosition1); valueAxis.Scale = numericalScale1; //valueAxis.Style.Visible = false; var polarCoordinateSystem = new PolarCoordinateSystem(); polarCoordinateSystem.AngularAxis = categoryAxis; polarCoordinateSystem.Name = "polarCoordinateSystem1"; polarCoordinateSystem.RadialAxis = valueAxis; graph.CoordinateSystems.Add(polarCoordinateSystem); var valuecolumn = ChartReportReportDTO.EntityChartReportValues.First(); var categoryColumn = ChartReportReportDTO.EntityChartReportCategories.First(); var categoryGroup = new GraphGroup(); categoryGroup.Name = categoryColumn.EntityListViewColumn.RelativeColumnName; categoryGroup.Groupings.Add(new Grouping(string.Format("= Fields.{0}", categoryColumn.EntityListViewColumn.RelativeColumnName))); categoryGroup.Sortings.Add(new Telerik.Reporting.Sorting(string.Format("= Fields.{0}", categoryColumn.EntityListViewColumn.RelativeColumnName), Telerik.Reporting.SortDirection.Asc)); graph.CategoryGroups.Add(categoryGroup); //if(ChartReportReportDTO.EntityChartReportSeries.Count>0) //{ //} var column = ChartReportReportDTO.EntityChartReportSeries.First(); var barSeries = new Telerik.Reporting.BarSeries(); barSeries.ArrangeMode = Telerik.Reporting.GraphSeriesArrangeMode.Stacked; graph.Series.Add(barSeries); barSeries.Name = column.EntityListViewColumn.RelativeColumnName; barSeries.CategoryGroup = categoryGroup; barSeries.CoordinateSystem = polarCoordinateSystem; barSeries.DataPointLabel = string.Format("= {0}(Fields.{1})", valuecolumn.FunctionType.ToString(), valuecolumn.EntityListViewColumn.RelativeColumnName); barSeries.DataPointLabelStyle.Visible = false; barSeries.LegendItem.Value = "= Fields.Name"; barSeries.Y = string.Format("= {0}(Fields.{1})+0.1", valuecolumn.FunctionType.ToString(), valuecolumn.EntityListViewColumn.RelativeColumnName); barSeries.LegendItem.Value = string.Format("= Fields.{0}", column.EntityListViewColumn.RelativeColumnName); var serieGroup = new GraphGroup(); //اگر نام ست نشده باشد گزارش درست کار نمیکند!!!!؟ serieGroup.Name = column.EntityListViewColumn.RelativeColumnName; serieGroup.Groupings.Add(new Telerik.Reporting.Grouping(string.Format("= Fields.{0}", column.EntityListViewColumn.RelativeColumnName))); serieGroup.Sortings.Add(new Telerik.Reporting.Sorting(string.Format("= Fields.{0}", column.EntityListViewColumn.RelativeColumnName), Telerik.Reporting.SortDirection.Asc)); graph.SeriesGroups.Add(serieGroup); barSeries.SeriesGroup = serieGroup; barSeries.ToolTip.Text = string.Format("= {0}(Fields.{1})", valuecolumn.FunctionType.ToString(), valuecolumn.EntityListViewColumn.RelativeColumnName); // barSeries.ToolTip.Title = string.Format("= Fields.{0}", column.EntityListViewColumn.RelativeColumnName); var legendValue = string.Format("= Fields.{0}", column.EntityListViewColumn.RelativeColumnName); var parentGeoup = serieGroup; foreach (var cColumn in ChartReportReportDTO.EntityChartReportSeries.Where(x => x != column)) { var newGroup = new GraphGroup(); newGroup.Name = cColumn.EntityListViewColumn.RelativeColumnName; newGroup.Groupings.Add(new Telerik.Reporting.Grouping(string.Format("= Fields.{0}", cColumn.EntityListViewColumn.RelativeColumnName))); newGroup.Sortings.Add(new Telerik.Reporting.Sorting(string.Format("= Fields.{0}", cColumn.EntityListViewColumn.RelativeColumnName), Telerik.Reporting.SortDirection.Asc)); parentGeoup.ChildGroups.Add(newGroup); barSeries.SeriesGroup = newGroup; parentGeoup = newGroup; legendValue += "+ \'/\' +" + string.Format(" Fields.{0}", cColumn.EntityListViewColumn.RelativeColumnName); } barSeries.LegendItem.Value = legendValue; barSeries.ToolTip.Title = legendValue; return(new Tuple <Report, Graph>(report, graph)); }