コード例 #1
1
        public static void Generate(Telerik.ReportViewer.Html5.WebForms.ReportViewer rv, IEnumerable<object> data, string extension, SortDescriptorCollection sortDescriptors, GroupDescriptorCollection grpDescriptors)
        {
            Telerik.Reporting.Report report1 = new Telerik.Reporting.Report();
            report1.DataSource = data;
            string sortCol = "";
            string sortDir = "";

            //multi sort can be done by iterating through collection like for group
            if (sortDescriptors.Count > 0)
            {
                ColumnSortDescriptor sd = sortDescriptors[0] as ColumnSortDescriptor;
                sortCol = sd.Column.UniqueName;
                sortDir = sd.SortDirection.ToString();
            }

            //Page Header Section
            Telerik.Reporting.PageHeaderSection pageHeaderSection1 = new Telerik.Reporting.PageHeaderSection();
            pageHeaderSection1.Height = new Telerik.Reporting.Drawing.Unit(0.3, Telerik.Reporting.Drawing.UnitType.Inch);
            pageHeaderSection1.Style.BackgroundColor = Color.Gray;
            Telerik.Reporting.TextBox txtHead = new Telerik.Reporting.TextBox();
            txtHead.Value = "Title";
            txtHead.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(3.2395832538604736D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.02083333395421505D, Telerik.Reporting.Drawing.UnitType.Inch));
            txtHead.Name = "reportTitle";
            txtHead.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(5.5603775978088379D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.20000000298023224D, Telerik.Reporting.Drawing.UnitType.Inch));
            pageHeaderSection1.Items.AddRange(new Telerik.Reporting.ReportItemBase[] { txtHead });

            IEnumerator dataColl = data.GetEnumerator();
            int count = 0;
            int first = 0;
            object obj = null;

            while (dataColl.MoveNext())
            {
                if (first == 0)
                {
                    obj = dataColl.Current;
                    foreach (PropertyInfo info in obj.GetType().GetProperties())
                    {
                        count++;
                    }
                    first++;
                }
            }

            Telerik.Reporting.Drawing.Unit x = Telerik.Reporting.Drawing.Unit.Inch(0);
            Telerik.Reporting.Drawing.Unit y = Telerik.Reporting.Drawing.Unit.Inch(0);
            Telerik.Reporting.ReportItemBase[] headColumnList = new Telerik.Reporting.ReportItem[count];
            Telerik.Reporting.ReportItemBase[] detailColumnList = new Telerik.Reporting.ReportItem[count];
            Telerik.Reporting.Group group = new Telerik.Reporting.Group();
            SizeU size = new SizeU(Telerik.Reporting.Drawing.Unit.Inch((double)(22) / count), Telerik.Reporting.Drawing.Unit.Inch(0.6));
            int column = 0;

            foreach (PropertyInfo info in obj.GetType().GetProperties())
            {
                string columnName = info.Name;
                Telerik.Reporting.HtmlTextBox headerCol = CreateTxtHeader(columnName, column);
                headerCol.Style.BackgroundColor = Color.LemonChiffon;
                headerCol.Style.BorderStyle.Default = BorderType.Solid;
                headerCol.Style.BorderWidth.Default = Unit.Pixel(1);
                headerCol.CanGrow = true;
                headerCol.Location = new Telerik.Reporting.Drawing.PointU(x, y);
                headerCol.Size = size;
                headColumnList[column] = headerCol;
                Telerik.Reporting.TextBox textBox = CreateTxtDetail(columnName, column);
                textBox.Style.BorderStyle.Default = BorderType.Solid;
                textBox.Style.BorderWidth.Default = Unit.Pixel(1);
                textBox.CanGrow = true;
                textBox.Location = new Telerik.Reporting.Drawing.PointU(x, y);
                textBox.Size = size;
                detailColumnList[column] = textBox;
                textBox.ItemDataBinding += new EventHandler(textBox_ItemDataBound);
                x += Telerik.Reporting.Drawing.Unit.Inch(headerCol.Size.Width.Value);
                column++;
            }

            Telerik.Reporting.ReportItemBase[] groupColumnList = new Telerik.Reporting.ReportItem[grpDescriptors.Count];
            int i = grpDescriptors.Count;
            if (grpDescriptors.Count > 0)
            {
                Telerik.Reporting.GroupHeaderSection groupHeaderSection1 = new Telerik.Reporting.GroupHeaderSection();
                foreach (ColumnGroupDescriptor grpDescriptor in grpDescriptors)
                {
                    string grpCol = grpDescriptor.Column.UniqueName;
                    group.Groupings.Add(new Grouping("=Fields." + grpCol));
                    if (grpDescriptor.SortDirection.ToString().ToLower() == "descending")
                    {
                        group.Sortings.Add(new Sorting("=Fields." + grpCol, SortDirection.Desc));
                    }
                    else
                    {
                        group.Sortings.Add(new Sorting("=Fields." + grpCol, SortDirection.Asc));
                    }
                    i--;
                    Telerik.Reporting.TextBox hdCol = new Telerik.Reporting.TextBox();
                    hdCol.Style.BackgroundColor = Color.Orange;
                    hdCol.Style.BorderStyle.Default = BorderType.Solid;
                    hdCol.Style.BorderWidth.Default = Unit.Pixel(1);
                    hdCol.KeepTogether = true;
                    hdCol.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(5.5603775978088379D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.20000000298023224D, Telerik.Reporting.Drawing.UnitType.Inch));
                    hdCol.Value = "=[" + grpCol + "]";
                    groupColumnList[i] = hdCol;
                    group.GroupHeader = groupHeaderSection1;
                    //to avoid extra row after group col
                    group.GroupHeader.Height = Telerik.Reporting.Drawing.Unit.Inch(0);
                }
                groupHeaderSection1.Items.AddRange(groupColumnList);
            }
            if (sortCol.Length > 0)
            {
                group.Groupings.Add(new Grouping("=Fields." + sortCol));
                if (sortDir.ToLower() == "descending")
                {
                    group.Sortings.Add(new Sorting("=Fields." + sortCol, SortDirection.Desc));
                }
                else
                {
                    group.Sortings.Add(new Sorting("=Fields." + sortCol, SortDirection.Asc));
                }
            }
            ReportHeaderSection reportHeaderSection1 = new Telerik.Reporting.ReportHeaderSection();
            reportHeaderSection1.Height = new Telerik.Reporting.Drawing.Unit(0.3, Telerik.Reporting.Drawing.UnitType.Inch);
            reportHeaderSection1.Items.AddRange(headColumnList);
            report1.Groups.Add(group);

            //Detail Section
            Telerik.Reporting.DetailSection detailSection1 = new Telerik.Reporting.DetailSection();
            detailSection1.Height = new Telerik.Reporting.Drawing.Unit(0.3, Telerik.Reporting.Drawing.UnitType.Inch);
            detailSection1.Items.AddRange(detailColumnList);

            //Page Footer Section
            Telerik.Reporting.PageFooterSection pageFooterSection1 = new Telerik.Reporting.PageFooterSection();
            pageFooterSection1.Height = new Telerik.Reporting.Drawing.Unit(0.3, Telerik.Reporting.Drawing.UnitType.Inch);
            pageFooterSection1.Style.BackgroundColor = Color.LightGray;
            pageFooterSection1.PrintOnFirstPage = true;
            pageFooterSection1.PrintOnLastPage = true;
            Telerik.Reporting.TextBox txtFooter = new Telerik.Reporting.TextBox();
            txtFooter.Value = "='Page ' + PageNumber + ' of ' + PageCount";
            txtFooter.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(4.2395832538604736D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.02083333395421505D, Telerik.Reporting.Drawing.UnitType.Inch));
            txtFooter.Name = "pageInfoTextBox";
            txtFooter.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(5.5603775978088379D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.20000000298023224D, Telerik.Reporting.Drawing.UnitType.Inch));
            Telerik.Reporting.PictureBox picBoxFooter = new Telerik.Reporting.PictureBox();
            picBoxFooter.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(5.2395832538604736D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.02083333395421505D, Telerik.Reporting.Drawing.UnitType.Inch));
            picBoxFooter.Value = @"C:\CCMSGoldStandard_Local\CCMSGoldStandard\CCMSAppShell\Images\no.png";
            picBoxFooter.Style.TextAlign = Telerik.Reporting.Drawing.
            HorizontalAlign.Center;
            picBoxFooter.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1, ((Telerik.Reporting.Drawing.UnitType)(Telerik.Reporting.Drawing.UnitType.Inch))), new Telerik.Reporting.Drawing.Unit(.5D, ((Telerik.Reporting.Drawing.UnitType)(Telerik.Reporting.Drawing.UnitType.Inch))));
            picBoxFooter.Sizing = ImageSizeMode.AutoSize;
            pageFooterSection1.Items.AddRange(new Telerik.Reporting.ReportItemBase[] { txtFooter, picBoxFooter });

            //add all section to report
            report1.Items.AddRange(new Telerik.Reporting.ReportItemBase[] { pageHeaderSection1, reportHeaderSection1, detailSection1, pageFooterSection1 });
            report1.PageSettings.Landscape = false;
            report1.PageSettings.Margins.Bottom = new Telerik.Reporting.Drawing.Unit(1D, Telerik.Reporting.Drawing.UnitType.Inch);
            report1.PageSettings.Margins.Left = new Telerik.Reporting.Drawing.Unit(.25, Telerik.Reporting.Drawing.UnitType.Inch);
            report1.PageSettings.Margins.Right = new Telerik.Reporting.Drawing.Unit(.25, Telerik.Reporting.Drawing.UnitType.Inch);
            report1.PageSettings.Margins.Top = new Telerik.Reporting.Drawing.Unit(1D, Telerik.Reporting.Drawing.UnitType.Inch);
            Telerik.Reporting.Drawing.SizeU paperSize = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(22, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(22, Telerik.Reporting.Drawing.UnitType.Inch));
            report1.PageSettings.PaperSize = paperSize;
            report1.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.Custom;
            Hashtable deviceInfo = new Hashtable();
            deviceInfo["FontEmbedding"] = "Subset";
            if (extension.ToLower() == "csv")
            {
                deviceInfo["NoHeader"] = true;
                deviceInfo["NoStaticText"] = true;
            }
            Telerik.Reporting.Processing.ReportProcessor RP = new Telerik.Reporting.Processing.ReportProcessor();
            byte[] buffer = RP.RenderReport(extension.ToUpper(), report1, deviceInfo).DocumentBytes;
            string myPath = "C:";
            string file = myPath + @"\" + DateTime.Now.ToString("HHmmss") + "." + extension;
            FileStream fs = new FileStream(file, FileMode.Create);
            fs.Write(buffer, 0, buffer.Length);
            fs.Flush();
            fs.Close();

            Process.Start(file);
        }
コード例 #2
0
        //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));
        }
コード例 #3
0
        private void SetReportDetails(DR_Requester requester, Report report, List <ColumnSizeLocation> columnsSizeLocation)
        {
            bool hasSub = ListReportReportDTO.EntityListReportSubs.Any();

            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);


            Panel panel = new Panel();

            panel.Width = reportWidth;
            ReportStyles.SetDetailPanelStyle(panel.Style, hasSub);
            detail.Items.Add(panel);
            //سکوریتی بروی ستوها اعمال شود
            var columns = ListReportReportDTO.EntityListView.EntityListViewAllColumns;

            int index = 0;

            foreach (var column in columns)
            {
                if (ListReportReportDTO.ReportGroups != null)
                {
                    if (ListReportReportDTO.ReportGroups.Any(x => x.ListViewColumnID == column.ID))
                    {
                        continue;
                    }
                }
                var columnTextbox = new TextBox();
                columnTextbox.CanGrow = false;

                columnTextbox.Name = column.Column.Name;
                ReportStyles.SetDetailTextboxStyle(columnTextbox.Style);
                var columnSizeLocation = columnsSizeLocation.First(x => x.LictViewColumnID == column.ID);
                columnTextbox.Width    = columnSizeLocation.Width;
                columnTextbox.Location = new PointU(columnSizeLocation.XLocation - Unit.Cm(0.0), Unit.Cm(0));
                columnTextbox.Height   = detail.Height;
                //var columnName = "";
                //if (column.RelationshipTailID == 0)
                //{
                //    columnName = column.Column.Name + "0";// + "'";

                //}
                //else
                //{

                //}
                columnTextbox.Value = string.Format("= Fields.{0}", column.RelativeColumnName);
                panel.Items.Add(columnTextbox);
                index++;
            }
            int subIndex = 0;

            foreach (var subDTO in ListReportReportDTO.EntityListReportSubs)
            {
                if (CheckSubReportIsRepeated(subDTO))
                {
                    continue;
                }
                SubReport subReport = new SubReport();
                subReport.Width = reportWidth;
                subReport.Top   = detail.Height + Unit.Cm(subIndex * 0.5);
                subIndex++;


                RR_ReportSourceRequest newrequest = new RR_ReportSourceRequest(Request.Requester);
                newrequest.Identity = Request.Identity;
                newrequest.Name     = Request.Name;
                var tail = bizEntityRelationshipTail.GetEntityRelationshipTail(requester, subDTO.EntityRelationshipTailID);
                newrequest.SearchDataItems = new DP_SearchRepository(tail.TargetEntityID);

                var entityListReport = bizEntityListReport.GetEntityListReport(requester, subDTO.EntityListReportID, true);
                newrequest.ReportID = entityListReport.ID;
                Unit SubReportWidth = reportWidth - Unit.Cm(1);
                //    var relationshipTail = bizEntityRelationshipTail.GetEntityRelationshipTail(subDTO.EntityRelationshipTailID);

                ListReportResolver listReportResolver = new ListReportResolver(entityListReport, newrequest, SubReportWidth, this, subDTO, ReportLevel + 1);
                var subListReportSource = listReportResolver.GetListReport(requester);
                subReport.ReportSource = subListReportSource;
                subReport.Left         = Unit.Cm(0.5);

                ReportStyles.SetSubreportStyle(subReport.Style);


                foreach (var relColumn in subDTO.SubsColumnsDTO)
                {
                    var parameter = new Parameter();
                    parameter.Name  = relColumn.ParentEntityListViewColumnRelativeName;
                    parameter.Value = string.Format("= Fields.{0}", relColumn.ParentEntityListViewColumnRelativeName);
                    subReport.Parameters.Add(parameter);
                }


                detail.Items.Add(subReport);
            }
        }
コード例 #4
0
 /// <summary>
 /// Required method for telerik Reporting designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Invoice));
     Telerik.Reporting.ReportParameter reportParameter1 = new Telerik.Reporting.ReportParameter();
     Telerik.Reporting.ReportParameter reportParameter2 = new Telerik.Reporting.ReportParameter();
     Telerik.Reporting.ReportParameter reportParameter3 = new Telerik.Reporting.ReportParameter();
     this.OrderNumbersDataSource = new Telerik.Reporting.SqlDataSource();
     this.detail = new Telerik.Reporting.DetailSection();
     this.panel4 = new Telerik.Reporting.Panel();
     this.textBox14 = new Telerik.Reporting.TextBox();
     this.textBox10 = new Telerik.Reporting.TextBox();
     this.textBox9 = new Telerik.Reporting.TextBox();
     this.textBox8 = new Telerik.Reporting.TextBox();
     this.textBox6 = new Telerik.Reporting.TextBox();
     this.textBox4 = new Telerik.Reporting.TextBox();
     this.textBox12 = new Telerik.Reporting.TextBox();
     this.textBox13 = new Telerik.Reporting.TextBox();
     this.textBox11 = new Telerik.Reporting.TextBox();
     this.textBox16 = new Telerik.Reporting.TextBox();
     this.textBox17 = new Telerik.Reporting.TextBox();
     this.textBox18 = new Telerik.Reporting.TextBox();
     this.textBox19 = new Telerik.Reporting.TextBox();
     this.textBox21 = new Telerik.Reporting.TextBox();
     this.textBox28 = new Telerik.Reporting.TextBox();
     this.textBox29 = new Telerik.Reporting.TextBox();
     this.textBox30 = new Telerik.Reporting.TextBox();
     this.textBox31 = new Telerik.Reporting.TextBox();
     this.textBox32 = new Telerik.Reporting.TextBox();
     this.panel1 = new Telerik.Reporting.Panel();
     this.textBox24 = new Telerik.Reporting.TextBox();
     this.textBox23 = new Telerik.Reporting.TextBox();
     this.textBox25 = new Telerik.Reporting.TextBox();
     this.textBox26 = new Telerik.Reporting.TextBox();
     this.textBox27 = new Telerik.Reporting.TextBox();
     this.panel2 = new Telerik.Reporting.Panel();
     this.textBox7 = new Telerik.Reporting.TextBox();
     this.textBox2 = new Telerik.Reporting.TextBox();
     this.textBox3 = new Telerik.Reporting.TextBox();
     this.group1 = new Telerik.Reporting.Group();
     this.groupFooterSection1 = new Telerik.Reporting.GroupFooterSection();
     this.groupHeaderSection1 = new Telerik.Reporting.GroupHeaderSection();
     this.panel5 = new Telerik.Reporting.Panel();
     this.Text1 = new Telerik.Reporting.TextBox();
     this.Field6 = new Telerik.Reporting.TextBox();
     this.Text12 = new Telerik.Reporting.TextBox();
     this.Id1 = new Telerik.Reporting.TextBox();
     this.barcode2 = new Telerik.Reporting.Barcode();
     this.pictureBox1 = new Telerik.Reporting.PictureBox();
     this.textBox1 = new Telerik.Reporting.TextBox();
     this.panel3 = new Telerik.Reporting.Panel();
     this.Text8 = new Telerik.Reporting.TextBox();
     this.InvoicesDataSource = new Telerik.Reporting.SqlDataSource();
     this.pageFooterSection1 = new Telerik.Reporting.PageFooterSection();
     this.textBox5 = new Telerik.Reporting.TextBox();
     this.textBox22 = new Telerik.Reporting.TextBox();
     this.subReport1 = new Telerik.Reporting.SubReport();
     this.salesOrderDetails1 = new Telerik.Reporting.SalesOrderDetails();
     ((System.ComponentModel.ISupportInitialize)(this.salesOrderDetails1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
     //
     // OrderNumbersDataSource
     //
     this.OrderNumbersDataSource.ConnectionString = "Telerik.Reporting.Examples.CSharp.Properties.Settings.TelerikConnectionString";
     this.OrderNumbersDataSource.Name = "OrderNumbers";
     this.OrderNumbersDataSource.Parameters.AddRange(new Telerik.Reporting.SqlDataSourceParameter[] {
     new Telerik.Reporting.SqlDataSourceParameter("@ForYear", System.Data.DbType.String, "=Parameters.ForYear.Value"),
     new Telerik.Reporting.SqlDataSourceParameter("@ForMonth", System.Data.DbType.String, "=Parameters.ForMonth.Value")});
     this.OrderNumbersDataSource.SelectCommand = resources.GetString("OrderNumbersDataSource.SelectCommand");
     //
     // detail
     //
     this.detail.Height = new Telerik.Reporting.Drawing.Unit(3.2780463695526123D, Telerik.Reporting.Drawing.UnitType.Inch);
     this.detail.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
     this.panel4,
     this.subReport1});
     this.detail.KeepTogether = false;
     this.detail.Name = "detail";
     //
     // panel4
     //
     this.panel4.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
     this.textBox14,
     this.textBox10,
     this.textBox9,
     this.textBox8,
     this.textBox6,
     this.textBox4,
     this.textBox12,
     this.textBox13,
     this.textBox11,
     this.textBox16,
     this.textBox17,
     this.textBox18,
     this.textBox19,
     this.textBox21,
     this.textBox28,
     this.textBox29,
     this.textBox30,
     this.textBox31,
     this.textBox32,
     this.panel1,
     this.panel2,
     this.textBox2,
     this.textBox3});
     this.panel4.KeepTogether = false;
     this.panel4.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.0833333358168602D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.panel4.Name = "panel4";
     this.panel4.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(7.5D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(2.7000000476837158D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.panel4.Style.BorderColor.Default = System.Drawing.Color.FromArgb(((int)(((byte)(173)))), ((int)(((byte)(221)))), ((int)(((byte)(252)))));
     this.panel4.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid;
     //
     // textBox14
     //
     this.textBox14.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(1.0103377103805542D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.38954368233680725D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox14.Name = "textBox14";
     this.textBox14.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.9937108755111694D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.19999997317790985D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox14.Value = "=Fields.Store";
     //
     // textBox10
     //
     this.textBox10.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(1.0103377103805542D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(1.8120609521865845D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox10.Name = "textBox10";
     this.textBox10.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.9937108755111694D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.19999997317790985D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox10.Value = "=Fields.CustPhone";
     //
     // textBox9
     //
     this.textBox9.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(1.0103377103805542D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(1.5259628295898438D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox9.Name = "textBox9";
     this.textBox9.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.993710994720459D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.19999997317790985D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox9.Value = "=Fields.CustFirstName + \" \" + Fields.CustLastName";
     //
     // textBox8
     //
     this.textBox8.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0.099921144545078278D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(1.5259628295898438D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox8.Name = "textBox8";
     this.textBox8.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(0.72496062517166138D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.19999997317790985D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox8.Style.Font.Bold = true;
     this.textBox8.Style.Font.Name = "Verdana";
     this.textBox8.Value = "Contact:";
     //
     // textBox6
     //
     this.textBox6.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(1.0103377103805542D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(1.1898593902587891D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox6.Name = "textBox6";
     this.textBox6.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.9937108755111694D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.19999997317790985D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox6.Value = "=Fields.BillCountryRegion";
     //
     // textBox4
     //
     this.textBox4.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(1.0103377103805542D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.98978042602539062D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox4.Name = "textBox4";
     this.textBox4.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.9937108755111694D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.19999997317790985D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox4.Value = "=Fields.BillPostalCode + \" \" + Fields.BillCity";
     //
     // textBox12
     //
     this.textBox12.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(1.0103377103805542D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.78970146179199219D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox12.Name = "textBox12";
     this.textBox12.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.9937108755111694D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.19999997317790985D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox12.Value = "=IsNull(Fields.BillAddress2, \'No secondary Address\')";
     //
     // textBox13
     //
     this.textBox13.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(1.0103377103805542D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.58962249755859375D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox13.Name = "textBox13";
     this.textBox13.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.9937108755111694D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.19999997317790985D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox13.Value = "=Fields.BillAddress1";
     //
     // textBox11
     //
     this.textBox11.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0.099921144545078278D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(1.8120609521865845D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox11.Name = "textBox11";
     this.textBox11.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(0.72496062517166138D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.19999997317790985D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox11.Style.Font.Bold = true;
     this.textBox11.Style.Font.Name = "Verdana";
     this.textBox11.Value = "Phone:";
     //
     // textBox16
     //
     this.textBox16.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(4.7736506462097168D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.389543741941452D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox16.Name = "textBox16";
     this.textBox16.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(2.6291275024414062D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.19999997317790985D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox16.Value = "=Fields.Store";
     //
     // textBox17
     //
     this.textBox17.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(4.7736506462097168D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.58962267637252808D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox17.Name = "textBox17";
     this.textBox17.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(2.6291275024414062D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.19999997317790985D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox17.Value = "=Fields.ShipAddress1";
     //
     // textBox18
     //
     this.textBox18.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(4.7736506462097168D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.78970146179199219D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox18.Name = "textBox18";
     this.textBox18.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(2.6291275024414062D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.19999997317790985D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox18.Value = "=IsNull(Fields.ShipAddress2, \'No secondary Address\')";
     //
     // textBox19
     //
     this.textBox19.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(4.7736506462097168D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.98978042602539062D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox19.Name = "textBox19";
     this.textBox19.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(2.6291275024414062D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.19999997317790985D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox19.Value = "=Fields.ShipPostalCode + \" \" + Fields.ShipCity + \", \" + Fields.ShipStateProvince " +
         "";
     //
     // textBox21
     //
     this.textBox21.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(4.7736506462097168D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(1.18985915184021D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox21.Name = "textBox21";
     this.textBox21.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(2.6291275024414062D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.19999997317790985D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox21.Value = "=Fields.ShipCountryRegion";
     //
     // textBox28
     //
     this.textBox28.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(5.7430548667907715D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(2.332122802734375D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox28.Name = "textBox28";
     this.textBox28.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.6736117601394653D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.19999997317790985D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox28.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
     this.textBox28.Value = "=Fields.ShipMethod";
     //
     // textBox29
     //
     this.textBox29.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(4.3639674186706543D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(2.332122802734375D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox29.Name = "textBox29";
     this.textBox29.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.3790086507797241D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.19999997317790985D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox29.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
     this.textBox29.Value = "=Fields.PurchaseOrderNumber";
     //
     // textBox30
     //
     this.textBox30.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(2.3792455196380615D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(2.332122802734375D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox30.Name = "textBox30";
     this.textBox30.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.9846428632736206D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.19999997317790985D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox30.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
     this.textBox30.Value = "=Fields.SalesFirstName + \" \" + Fields.SalesLastName";
     //
     // textBox31
     //
     this.textBox31.Format = "{0:d}";
     this.textBox31.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0.099921144545078278D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(2.332122802734375D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox31.Name = "textBox31";
     this.textBox31.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.1395833492279053D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.19999997317790985D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox31.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
     this.textBox31.Value = "=Now()";
     //
     // textBox32
     //
     this.textBox32.Format = "{0:d}";
     this.textBox32.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(1.2395831346511841D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(2.332122802734375D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox32.Name = "textBox32";
     this.textBox32.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.1395833492279053D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.19999997317790985D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox32.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
     this.textBox32.Value = "=Fields.OrderDate";
     //
     // panel1
     //
     this.panel1.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
     this.textBox24,
     this.textBox23,
     this.textBox25,
     this.textBox26,
     this.textBox27});
     this.panel1.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0.099921144545078278D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(2.05200457572937D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.panel1.Name = "panel1";
     this.panel1.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(7.316746711730957D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.2800394594669342D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.panel1.Style.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(245)))), ((int)(((byte)(255)))));
     //
     // textBox24
     //
     this.textBox24.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox24.Name = "textBox24";
     this.textBox24.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.1395833492279053D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.2800000011920929D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox24.Style.Font.Bold = true;
     this.textBox24.Style.Font.Name = "Verdana";
     this.textBox24.Style.Font.Size = new Telerik.Reporting.Drawing.Unit(10D, Telerik.Reporting.Drawing.UnitType.Point);
     this.textBox24.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
     this.textBox24.Value = "Date";
     //
     // textBox23
     //
     this.textBox23.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(1.1396621465682983D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox23.Name = "textBox23";
     this.textBox23.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.1395833492279053D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.2800000011920929D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox23.Style.Font.Bold = true;
     this.textBox23.Style.Font.Name = "Verdana";
     this.textBox23.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
     this.textBox23.Value = "Order Date";
     //
     // textBox25
     //
     this.textBox25.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(2.2793638706207275D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox25.Name = "textBox25";
     this.textBox25.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.9846034049987793D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.2800000011920929D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox25.Style.Font.Bold = true;
     this.textBox25.Style.Font.Name = "Verdana";
     this.textBox25.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
     this.textBox25.Value = "Sales Person";
     //
     // textBox26
     //
     this.textBox26.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(4.2640457153320312D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox26.Name = "textBox26";
     this.textBox26.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.3790086507797241D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.2800000011920929D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox26.Style.Font.Bold = true;
     this.textBox26.Style.Font.Name = "Verdana";
     this.textBox26.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
     this.textBox26.Value = "Purchase Order";
     //
     // textBox27
     //
     this.textBox27.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(5.6431331634521484D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox27.Name = "textBox27";
     this.textBox27.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.6736125946044922D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.2800000011920929D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox27.Style.Font.Bold = true;
     this.textBox27.Style.Font.Name = "Verdana";
     this.textBox27.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
     this.textBox27.Value = "Shipment Method";
     //
     // panel2
     //
     this.panel2.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
     this.textBox7});
     this.panel2.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0.099921144545078278D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.099464893341064453D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.panel2.Name = "panel2";
     this.panel2.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(7.3028569221496582D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.29003939032554626D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.panel2.Style.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(245)))), ((int)(((byte)(255)))));
     //
     // textBox7
     //
     this.textBox7.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox7.Name = "textBox7";
     this.textBox7.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(2.9041273593902588D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.28999999165534973D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox7.Style.Font.Bold = true;
     this.textBox7.Style.Font.Name = "Verdana";
     this.textBox7.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
     this.textBox7.Value = "Customer Details";
     //
     // textBox2
     //
     this.textBox2.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0.099921144545078278D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.38958317041397095D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox2.Name = "textBox2";
     this.textBox2.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(0.800000011920929D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.19999997317790985D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox2.Style.Font.Bold = true;
     this.textBox2.Style.Font.Name = "Verdana";
     this.textBox2.Value = "Address:";
     //
     // textBox3
     //
     this.textBox3.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(4.0519428253173828D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.389543741941452D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox3.Name = "textBox3";
     this.textBox3.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(0.72162878513336182D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.19999997317790985D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox3.Style.Font.Bold = true;
     this.textBox3.Style.Font.Name = "Verdana";
     this.textBox3.Value = "Ship to:";
     //
     // group1
     //
     this.group1.GroupFooter = this.groupFooterSection1;
     this.group1.GroupHeader = this.groupHeaderSection1;
     this.group1.Name = "group1";
     //
     // groupFooterSection1
     //
     this.groupFooterSection1.Height = new Telerik.Reporting.Drawing.Unit(0.23541705310344696D, Telerik.Reporting.Drawing.UnitType.Inch);
     this.groupFooterSection1.Name = "groupFooterSection1";
     this.groupFooterSection1.Style.Visible = false;
     //
     // groupHeaderSection1
     //
     this.groupHeaderSection1.Height = new Telerik.Reporting.Drawing.Unit(1.2865371704101563D, Telerik.Reporting.Drawing.UnitType.Inch);
     this.groupHeaderSection1.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
     this.panel5});
     this.groupHeaderSection1.Name = "groupHeaderSection1";
     //
     // panel5
     //
     this.panel5.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
     this.Text1,
     this.Field6,
     this.Text12,
     this.Id1,
     this.barcode2,
     this.pictureBox1,
     this.textBox1,
     this.panel3,
     this.Text8});
     this.panel5.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0.010456085205078125D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(3.9339065551757812E-05D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.panel5.Name = "panel5";
     this.panel5.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(19.023441314697266D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(3.2677044868469238D, Telerik.Reporting.Drawing.UnitType.Cm));
     this.panel5.Style.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(240)))), ((int)(((byte)(255)))));
     this.panel5.Style.BorderColor.Default = System.Drawing.Color.FromArgb(((int)(((byte)(173)))), ((int)(((byte)(221)))), ((int)(((byte)(252)))));
     this.panel5.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid;
     //
     // Text1
     //
     this.Text1.CanGrow = false;
     this.Text1.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(5.0309247970581055D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0.9893181324005127D, Telerik.Reporting.Drawing.UnitType.Cm));
     this.Text1.Name = "Text1";
     this.Text1.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(4.852510929107666D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(1.523809552192688D, Telerik.Reporting.Drawing.UnitType.Cm));
     this.Text1.Style.BackgroundColor = System.Drawing.Color.Empty;
     this.Text1.Style.BorderColor.Default = System.Drawing.Color.Black;
     this.Text1.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.None;
     this.Text1.Style.Color = System.Drawing.Color.Black;
     this.Text1.Style.Font.Bold = false;
     this.Text1.Style.Font.Italic = false;
     this.Text1.Style.Font.Name = "Verdana";
     this.Text1.Style.Font.Size = new Telerik.Reporting.Drawing.Unit(8D, Telerik.Reporting.Drawing.UnitType.Point);
     this.Text1.Style.Font.Strikeout = false;
     this.Text1.Style.Font.Underline = false;
     this.Text1.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Left;
     this.Text1.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Top;
     this.Text1.Style.Visible = true;
     this.Text1.Value = "275 Grove St., Suite 2-400, Newton, MA 02466\r\nPhone: +1.888.365.2779\r\nFax: +1.617" +
         ".249.2116";
     //
     // Field6
     //
     this.Field6.CanGrow = false;
     this.Field6.Format = "{0:d}";
     this.Field6.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(16.280376434326172D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(2.2130587100982666D, Telerik.Reporting.Drawing.UnitType.Cm));
     this.Field6.Name = "Field6";
     this.Field6.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(2.7429654598236084D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0.5D, Telerik.Reporting.Drawing.UnitType.Cm));
     this.Field6.Style.BackgroundColor = System.Drawing.Color.Empty;
     this.Field6.Style.BorderColor.Default = System.Drawing.Color.Black;
     this.Field6.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.None;
     this.Field6.Style.Color = System.Drawing.Color.OrangeRed;
     this.Field6.Style.Font.Bold = true;
     this.Field6.Style.Font.Italic = false;
     this.Field6.Style.Font.Name = "Verdana";
     this.Field6.Style.Font.Size = new Telerik.Reporting.Drawing.Unit(10D, Telerik.Reporting.Drawing.UnitType.Point);
     this.Field6.Style.Font.Strikeout = false;
     this.Field6.Style.Font.Underline = false;
     this.Field6.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Left;
     this.Field6.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Bottom;
     this.Field6.Style.Visible = true;
     this.Field6.Value = "=Now()";
     //
     // Text12
     //
     this.Text12.CanGrow = false;
     this.Text12.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(10.177068710327148D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(2.2130589485168457D, Telerik.Reporting.Drawing.UnitType.Cm));
     this.Text12.Name = "Text12";
     this.Text12.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(2.6963250637054443D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0.5D, Telerik.Reporting.Drawing.UnitType.Cm));
     this.Text12.Style.BackgroundColor = System.Drawing.Color.Empty;
     this.Text12.Style.BorderColor.Default = System.Drawing.Color.Black;
     this.Text12.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.None;
     this.Text12.Style.Color = System.Drawing.Color.Black;
     this.Text12.Style.Font.Bold = true;
     this.Text12.Style.Font.Italic = false;
     this.Text12.Style.Font.Name = "Verdana";
     this.Text12.Style.Font.Size = new Telerik.Reporting.Drawing.Unit(10D, Telerik.Reporting.Drawing.UnitType.Point);
     this.Text12.Style.Font.Strikeout = false;
     this.Text12.Style.Font.Underline = false;
     this.Text12.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Right;
     this.Text12.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Bottom;
     this.Text12.Style.Visible = true;
     this.Text12.Value = "Sales Order:";
     //
     // Id1
     //
     this.Id1.CanGrow = false;
     this.Id1.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(12.8735933303833D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(2.2130589485168457D, Telerik.Reporting.Drawing.UnitType.Cm));
     this.Id1.Name = "Id1";
     this.Id1.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(2.0355603694915771D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0.5D, Telerik.Reporting.Drawing.UnitType.Cm));
     this.Id1.Style.BackgroundColor = System.Drawing.Color.Empty;
     this.Id1.Style.BorderColor.Default = System.Drawing.Color.Black;
     this.Id1.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.None;
     this.Id1.Style.Color = System.Drawing.Color.OrangeRed;
     this.Id1.Style.Font.Bold = true;
     this.Id1.Style.Font.Italic = false;
     this.Id1.Style.Font.Name = "Verdana";
     this.Id1.Style.Font.Size = new Telerik.Reporting.Drawing.Unit(11D, Telerik.Reporting.Drawing.UnitType.Point);
     this.Id1.Style.Font.Strikeout = false;
     this.Id1.Style.Font.Underline = false;
     this.Id1.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Left;
     this.Id1.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Bottom;
     this.Id1.Style.Visible = true;
     this.Id1.Value = "=Fields.SalesOrderID";
     //
     // barcode2
     //
     this.barcode2.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(12.792195320129395D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0.24975340068340302D, Telerik.Reporting.Drawing.UnitType.Cm));
     this.barcode2.Name = "barcode2";
     this.barcode2.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(6.2312464714050293D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(1.7093372344970703D, Telerik.Reporting.Drawing.UnitType.Cm));
     this.barcode2.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;
     this.barcode2.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Bottom;
     this.barcode2.Value = "=Fields.PurchaseOrderNumber";
     //
     // pictureBox1
     //
     this.pictureBox1.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0.18954388797283173D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.078749977052211761D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.pictureBox1.MimeType = "image/jpeg";
     this.pictureBox1.Name = "pictureBox1";
     this.pictureBox1.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.6123565435409546D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.71079403162002563D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.pictureBox1.Style.BorderColor.Default = System.Drawing.Color.FromArgb(((int)(((byte)(173)))), ((int)(((byte)(221)))), ((int)(((byte)(252)))));
     this.pictureBox1.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid;
     this.pictureBox1.Style.BorderWidth.Default = new Telerik.Reporting.Drawing.Unit(1D, Telerik.Reporting.Drawing.UnitType.Point);
     this.pictureBox1.Value = ((object)(resources.GetObject("pictureBox1.Value")));
     //
     // textBox1
     //
     this.textBox1.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(1.9809513092041016D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.0983281135559082D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox1.Name = "textBox1";
     this.textBox1.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.9106760025024414D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.29121589660644531D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox1.Style.Color = System.Drawing.Color.FromArgb(((int)(((byte)(44)))), ((int)(((byte)(90)))), ((int)(((byte)(184)))));
     this.textBox1.Style.Font.Size = new Telerik.Reporting.Drawing.Unit(16D, Telerik.Reporting.Drawing.UnitType.Point);
     this.textBox1.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Left;
     this.textBox1.Value = "AdventureWorks";
     //
     // panel3
     //
     this.panel3.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(3.9418537198798731E-05D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(1.0682121515274048D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.panel3.Name = "panel3";
     this.panel3.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(7.4895052909851074D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.21828572452068329D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.panel3.Style.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(229)))), ((int)(((byte)(255)))));
     //
     // Text8
     //
     this.Text8.CanGrow = false;
     this.Text8.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(14.909354209899902D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(2.2130589485168457D, Telerik.Reporting.Drawing.UnitType.Cm));
     this.Text8.Name = "Text8";
     this.Text8.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.3708218336105347D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0.5D, Telerik.Reporting.Drawing.UnitType.Cm));
     this.Text8.Style.BackgroundColor = System.Drawing.Color.Empty;
     this.Text8.Style.BorderColor.Default = System.Drawing.Color.Black;
     this.Text8.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.None;
     this.Text8.Style.Color = System.Drawing.Color.Black;
     this.Text8.Style.Font.Bold = true;
     this.Text8.Style.Font.Italic = false;
     this.Text8.Style.Font.Name = "Verdana";
     this.Text8.Style.Font.Size = new Telerik.Reporting.Drawing.Unit(10D, Telerik.Reporting.Drawing.UnitType.Point);
     this.Text8.Style.Font.Strikeout = false;
     this.Text8.Style.Font.Underline = false;
     this.Text8.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Right;
     this.Text8.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Bottom;
     this.Text8.Style.Visible = true;
     this.Text8.Value = "Date:";
     //
     // InvoicesDataSource
     //
     this.InvoicesDataSource.ConnectionString = "Telerik.Reporting.Examples.CSharp.Properties.Settings.TelerikConnectionString";
     this.InvoicesDataSource.Name = "Invoices";
     this.InvoicesDataSource.Parameters.AddRange(new Telerik.Reporting.SqlDataSourceParameter[] {
     new Telerik.Reporting.SqlDataSourceParameter("@SalesOrderNumber", System.Data.DbType.String, "=Parameters.OrderNumber.Value")});
     this.InvoicesDataSource.SelectCommand = resources.GetString("InvoicesDataSource.SelectCommand");
     //
     // pageFooterSection1
     //
     this.pageFooterSection1.Height = new Telerik.Reporting.Drawing.Unit(0.1875D, Telerik.Reporting.Drawing.UnitType.Inch);
     this.pageFooterSection1.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
     this.textBox5,
     this.textBox22});
     this.pageFooterSection1.Name = "pageFooterSection1";
     this.pageFooterSection1.Style.BorderColor.Default = System.Drawing.Color.FromArgb(((int)(((byte)(173)))), ((int)(((byte)(221)))), ((int)(((byte)(252)))));
     this.pageFooterSection1.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid;
     this.pageFooterSection1.Style.BorderWidth.Default = new Telerik.Reporting.Drawing.Unit(1D, Telerik.Reporting.Drawing.UnitType.Pixel);
     //
     // textBox5
     //
     this.textBox5.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox5.Name = "textBox5";
     this.textBox5.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(3.40625D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.1875D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox5.Style.BackgroundColor = System.Drawing.Color.Empty;
     this.textBox5.Style.Color = System.Drawing.Color.FromArgb(((int)(((byte)(44)))), ((int)(((byte)(90)))), ((int)(((byte)(184)))));
     this.textBox5.Style.Font.Italic = false;
     this.textBox5.Value = "=PageExec(\"lineTotalDataTextBox\",Count(Fields.ProductNumber)) + \" products, \" + P" +
         "ageExec(\"lineTotalDataTextBox\",Sum(Fields.OrderQty)) + \" items on page  \" + Page" +
         "Number";
     //
     // textBox22
     //
     this.textBox22.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(5.2715086936950684D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(3.9418537198798731E-05D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox22.Name = "textBox22";
     this.textBox22.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(2.1312694549560547D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.18742115795612335D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.textBox22.Style.Color = System.Drawing.Color.FromArgb(((int)(((byte)(44)))), ((int)(((byte)(90)))), ((int)(((byte)(184)))));
     this.textBox22.Style.Font.Italic = false;
     this.textBox22.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Right;
     this.textBox22.Value = "=PageExec(\"lineTotalDataTextBox\",sum(LineTotal))";
     this.textBox22.Format = "{0:C2}";
     //
     // subReport1
     //
     this.subReport1.KeepTogether = false;
     this.subReport1.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(7.8837074397597462E-05D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(2.8858587741851807D, Telerik.Reporting.Drawing.UnitType.Inch));
     this.subReport1.Name = "subReport1";
     this.subReport1.Parameters.Add(new Telerik.Reporting.Parameter("SaledOrderID", "=Fields.SalesOrderID"));
     this.subReport1.ReportSource = this.salesOrderDetails1;
     this.subReport1.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(7.4999217987060547D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.27500006556510925D, Telerik.Reporting.Drawing.UnitType.Inch));
     //
     // salesOrderDetails1
     //
     this.salesOrderDetails1.Name = "salesOrderDetails1";
     //
     // Invoice
     //
     this.DataSource = this.InvoicesDataSource;
     this.Filters.AddRange(new Telerik.Reporting.Data.Filter[] {
     new Telerik.Reporting.Data.Filter("=Fields.SalesOrderNumber", Telerik.Reporting.Data.FilterOperator.Equal, "=Parameters.OrderNumber.Value")});
     this.Groups.AddRange(new Telerik.Reporting.Group[] {
     this.group1});
     this.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
     this.groupHeaderSection1,
     this.groupFooterSection1,
     this.detail,
     this.pageFooterSection1});
     this.PageSettings.Landscape = false;
     this.PageSettings.Margins.Bottom = new Telerik.Reporting.Drawing.Unit(0.5D, Telerik.Reporting.Drawing.UnitType.Inch);
     this.PageSettings.Margins.Left = new Telerik.Reporting.Drawing.Unit(0.5D, Telerik.Reporting.Drawing.UnitType.Inch);
     this.PageSettings.Margins.Right = new Telerik.Reporting.Drawing.Unit(0.5D, Telerik.Reporting.Drawing.UnitType.Inch);
     this.PageSettings.Margins.Top = new Telerik.Reporting.Drawing.Unit(0.5D, Telerik.Reporting.Drawing.UnitType.Inch);
     this.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.Letter;
     reportParameter1.AutoRefresh = true;
     reportParameter1.AvailableValues.DataSource = this.OrderNumbersDataSource;
     reportParameter1.AvailableValues.DisplayMember = "SalesOrderNumber";
     reportParameter1.AvailableValues.Sortings.AddRange(new Telerik.Reporting.Data.Sorting[] {
     new Telerik.Reporting.Data.Sorting("=Fields.SalesOrderNumber", Telerik.Reporting.Data.SortDirection.Asc)});
     reportParameter1.AvailableValues.ValueMember = "SalesOrderNumber";
     reportParameter1.Name = "OrderNumber";
     reportParameter1.Text = "Order #";
     reportParameter1.Value = "=First(Fields.SalesOrderNumber)";
     reportParameter1.Visible = true;
     reportParameter2.Name = "ForYear";
     reportParameter2.Type = Telerik.Reporting.ReportParameterType.Integer;
     reportParameter2.Value = "=2003";
     reportParameter3.Name = "ForMonth";
     reportParameter3.Type = Telerik.Reporting.ReportParameterType.Integer;
     reportParameter3.Value = "=7";
     this.ReportParameters.Add(reportParameter1);
     this.ReportParameters.Add(reportParameter2);
     this.ReportParameters.Add(reportParameter3);
     this.Style.BackgroundColor = System.Drawing.Color.White;
     this.Width = new Telerik.Reporting.Drawing.Unit(7.5000009536743164D, Telerik.Reporting.Drawing.UnitType.Inch);
     ((System.ComponentModel.ISupportInitialize)(this.salesOrderDetails1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
 }
コード例 #5
0
        private Tuple <Report, Crosstab> SetReportDetails(Report report)
        {
            var detail = new Telerik.Reporting.DetailSection();

            detail.Name = "detail";
            ReportStyles.SetReportDetailStyle(detail.Style);
            report.Items.Add(detail);

            var columnWidth  = Unit.Cm(2);
            var columnHeight = Unit.Cm(0.7);
            var crosstab     = new Crosstab();

            crosstab.Width = reportWidth;
            crosstab.Name  = "crosstab";
            // crosstab.Height = report.PageSettings.PaperSize.Height / 2;
            detail.Items.Add(crosstab);



            for (int c = 0; c <= CrosstabReportReportDTO.Columns.Count - 1; c++)
            {
                foreach (var val in CrosstabReportReportDTO.Values)
                {
                    crosstab.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(Telerik.Reporting.Drawing.Unit.Cm(2)));
                }
            }
            foreach (var val in CrosstabReportReportDTO.Values)
            {
                crosstab.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(Telerik.Reporting.Drawing.Unit.Cm(2)));
            }
            for (int r = 0; r <= CrosstabReportReportDTO.Rows.Count; r++)
            {
                crosstab.Body.Rows.Add(new Telerik.Reporting.TableBodyRow(Telerik.Reporting.Drawing.Unit.Cm(1)));
            }
            for (int c = 0; c <= crosstab.Body.Columns.Count - 1; c++)
            {
                for (int r = 0; r <= crosstab.Body.Rows.Count - 1; r++)
                {
                    var mod = c % CrosstabReportReportDTO.Values.Count;
                    Telerik.Reporting.TextBox textbox = new TextBox();
                    var val = CrosstabReportReportDTO.Values[mod];
                    textbox.Name   = val.EntityListViewColumn.Alias + c.ToString() + r.ToString();
                    textbox.Width  = columnWidth;
                    textbox.Height = columnHeight;
                    textbox.Value  = string.Format("= {0}(Fields.{1})", val.ValueFunction.ToString(), val.EntityListViewColumn.RelativeColumnName);
                    crosstab.Items.Add(textbox);
                    crosstab.Body.SetCellContent(r, c, textbox);
                    if (r == crosstab.Body.Rows.Count - 1)
                    {
                        ReportStyles.SetCrossTabRowHeader(textbox.Style);
                    }
                    else
                    {
                        if (c >= crosstab.Body.Columns.Count - CrosstabReportReportDTO.Values.Count)
                        {
                            ReportStyles.SetCrossTabRowHeader(textbox.Style);
                        }
                        else
                        {
                            if (c > CrosstabReportReportDTO.Values.Count - 1)
                            {
                                ReportStyles.SetCrossTabTotalRowColumnStyle(textbox.Style);
                            }
                            else
                            {
                                if (r > 0)
                                {
                                    ReportStyles.SetCrossTabTotalRowColumnStyle(textbox.Style);
                                }
                                else
                                {
                                    ReportStyles.SetCrossTabBodyTextboxStyle(textbox.Style);
                                }
                            }
                        }
                    }
                }
            }


            if (CrosstabReportReportDTO.Values.Count == 1)
            {
                for (int r = 0; r <= CrosstabReportReportDTO.Rows.Count - 1; r++)
                {
                    var textboxCorner = new TextBox();
                    textboxCorner.Name   = "corner" + r;
                    textboxCorner.Width  = columnWidth;
                    textboxCorner.Height = columnHeight;
                    textboxCorner.Value  = CrosstabReportReportDTO.Rows[r].EntityListViewColumn.Alias;
                    ReportStyles.SetCrossTabRowHeader(textboxCorner.Style);
                    var rowspan = CrosstabReportReportDTO.Columns.Count;
                    crosstab.Items.Add(textboxCorner);
                    crosstab.Corner.SetCellContent(0, r, textboxCorner, rowspan, 1);
                }
            }
            else
            {
                var emptytextboxCorner = new TextBox();
                emptytextboxCorner.Name   = "corner";
                emptytextboxCorner.Width  = columnWidth;
                emptytextboxCorner.Height = columnHeight;
                emptytextboxCorner.Value  = "";
                ReportStyles.SetCrossTabEmptyCornerTextboxStyle(emptytextboxCorner.Style);
                crosstab.Items.Add(emptytextboxCorner);
                crosstab.Corner.SetCellContent(0, 0, emptytextboxCorner, CrosstabReportReportDTO.Columns.Count, CrosstabReportReportDTO.Rows.Count);

                for (int r = 0; r <= CrosstabReportReportDTO.Rows.Count - 1; r++)
                {
                    var textboxCorner = new TextBox();
                    textboxCorner.Name   = "corner" + r;
                    textboxCorner.Width  = columnWidth;
                    textboxCorner.Height = columnHeight;
                    textboxCorner.Value  = CrosstabReportReportDTO.Rows[r].EntityListViewColumn.Alias;
                    ReportStyles.SetCrossTabRowHeader(textboxCorner.Style);
                    crosstab.Items.Add(textboxCorner);
                    crosstab.Corner.SetCellContent(CrosstabReportReportDTO.Columns.Count, r, textboxCorner);
                }
            }



            TableGroup prevDataTableGroup  = null;
            TableGroup prevTotalTableGroup = null;

            foreach (var item in CrosstabReportReportDTO.Columns.OrderByDescending(x => x.ID))
            {
                var newDataTableGroup = new TableGroup();
                newDataTableGroup.Name = "col" + item.EntityListViewColumn.Alias;
                newDataTableGroup.Groupings.Add(new Telerik.Reporting.Grouping(string.Format("= Fields.{0}", item.EntityListViewColumn.RelativeColumnName)));
                newDataTableGroup.Sortings.Add(new Telerik.Reporting.Sorting(string.Format("= Fields.{0}", item.EntityListViewColumn.RelativeColumnName), Telerik.Reporting.SortDirection.Asc));
                var textbox = new TextBox();
                textbox.Name  = "colt" + item.EntityListViewColumn.Alias;
                textbox.Size  = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(0.800000011920929D), Telerik.Reporting.Drawing.Unit.Inch(0.20000000298023224D));
                textbox.Value = string.Format("= Fields.{0}", item.EntityListViewColumn.RelativeColumnName);
                ReportStyles.SetCrossTabRowColumnStyle(textbox.Style);
                crosstab.Items.Add(textbox);
                newDataTableGroup.ReportItem = textbox;

                var newTotalTableGroup = new TableGroup();
                newTotalTableGroup.Name = "total_col_" + item.EntityListViewColumn.Alias;
                var totaltextbox = new TextBox();
                totaltextbox.Name  = "coltotal" + item.EntityListViewColumn.Alias;
                totaltextbox.Size  = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(0.800000011920929D), Telerik.Reporting.Drawing.Unit.Inch(0.20000000298023224D));
                totaltextbox.Value = "جمع";
                ReportStyles.SetCrossTabRowHeader(totaltextbox.Style);
                crosstab.Items.Add(totaltextbox);
                newTotalTableGroup.ReportItem = totaltextbox;



                if (prevDataTableGroup != null)
                {
                    newDataTableGroup.ChildGroups.Add(prevDataTableGroup);
                    newDataTableGroup.ChildGroups.Add(prevTotalTableGroup);
                }
                else if (CrosstabReportReportDTO.Values.Count > 1)
                {
                    //اولین گروهبندی..جزئی ترین..اگر مقادیر بیشتر از یکی باشند یک زیر گروه جدید برای هر مقدار ایجاد میشود
                    var index = 0;
                    foreach (var val in CrosstabReportReportDTO.Values)
                    {
                        var lastDataTableGroup = new TableGroup();
                        lastDataTableGroup.Name = "last" + val.EntityListViewColumn.Alias + index;
                        var lasttextbox = new TextBox();
                        lasttextbox.Name  = "lastTextbox" + val.EntityListViewColumn.Alias + index;
                        lasttextbox.Size  = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(0.800000011920929D), Telerik.Reporting.Drawing.Unit.Inch(0.20000000298023224D));
                        lasttextbox.Value = val.EntityListViewColumn.Alias;
                        ReportStyles.SetCrossTabRowHeader(lasttextbox.Style);
                        crosstab.Items.Add(lasttextbox);
                        lastDataTableGroup.ReportItem = lasttextbox;
                        newDataTableGroup.ChildGroups.Add(lastDataTableGroup);
                        index++;
                    }
                }



                if (prevDataTableGroup != null)
                {
                    var index = 0;
                    foreach (var val in CrosstabReportReportDTO.Values)
                    {
                        var lastTotalDataTableGroup = new TableGroup();
                        lastTotalDataTableGroup.Name = "lasttotal" + item.EntityListViewColumn.Alias + val.EntityListViewColumn.Alias + index;
                        var lasttotaltextbox = new TextBox();
                        lasttotaltextbox.Name  = "lasttotalTextbox" + item.EntityListViewColumn.Alias + val.EntityListViewColumn.Alias + index;
                        lasttotaltextbox.Size  = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(0.800000011920929D), Telerik.Reporting.Drawing.Unit.Inch(0.20000000298023224D));
                        lasttotaltextbox.Value = val.EntityListViewColumn.Alias;
                        ReportStyles.SetCrossTabRowHeader(lasttotaltextbox.Style);
                        crosstab.Items.Add(lasttotaltextbox);
                        lastTotalDataTableGroup.ReportItem = lasttotaltextbox;
                        newTotalTableGroup.ChildGroups.Add(lastTotalDataTableGroup);
                        index++;
                    }
                }
                else if (CrosstabReportReportDTO.Values.Count > 1)
                {
                    //اولین گروهبندی تجمیعی..جزئی ترین..اگر مقادیر بیشتر از یکی باشند یک زیر گروه جدید برای هر مقدار ایجاد میشود
                    var index = 0;
                    foreach (var val in CrosstabReportReportDTO.Values)
                    {
                        var smallestGroup = new TableGroup();
                        smallestGroup.Name = "lasttotal" + item.EntityListViewColumn.Alias + val.EntityListViewColumn.Alias + index;
                        var lasttotaltextbox = new TextBox();
                        lasttotaltextbox.Name  = "lasttotalTextbox" + item.EntityListViewColumn.Alias + val.EntityListViewColumn.Alias + index;
                        lasttotaltextbox.Size  = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(0.800000011920929D), Telerik.Reporting.Drawing.Unit.Inch(0.20000000298023224D));
                        lasttotaltextbox.Value = val.EntityListViewColumn.Alias;
                        ReportStyles.SetCrossTabRowHeader(lasttotaltextbox.Style);
                        crosstab.Items.Add(lasttotaltextbox);
                        smallestGroup.ReportItem = lasttotaltextbox;
                        newTotalTableGroup.ChildGroups.Add(smallestGroup);


                        index++;
                    }
                }



                prevDataTableGroup  = newDataTableGroup;
                prevTotalTableGroup = newTotalTableGroup;
            }
            crosstab.ColumnGroups.Add(prevDataTableGroup);
            crosstab.ColumnGroups.Add(prevTotalTableGroup);


            TableGroup prevRowDataTableGroup  = null;
            TableGroup prevRowTotalTableGroup = null;

            foreach (var item in CrosstabReportReportDTO.Rows.OrderByDescending(x => x.ID))
            {
                var newDataTableGroup = new TableGroup();
                newDataTableGroup.Name = "row" + item.EntityListViewColumn.Alias;
                if (prevRowDataTableGroup != null)
                {
                    newDataTableGroup.ChildGroups.Add(prevRowDataTableGroup);
                    newDataTableGroup.ChildGroups.Add(prevRowTotalTableGroup);
                }
                var textbox = new TextBox();
                textbox.Value = string.Format("= Fields.{0}", item.EntityListViewColumn.RelativeColumnName);
                textbox.Name  = "rowt" + item.EntityListViewColumn.Alias;
                textbox.Size  = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(0.800000011920929D), Telerik.Reporting.Drawing.Unit.Inch(0.20000000298023224D));
                crosstab.Items.Add(textbox);
                ReportStyles.SetCrossTabRowColumnStyle(textbox.Style);
                newDataTableGroup.ReportItem = textbox;
                newDataTableGroup.Groupings.Add(new Telerik.Reporting.Grouping(string.Format("= Fields.{0}", item.EntityListViewColumn.RelativeColumnName)));
                newDataTableGroup.Sortings.Add(new Telerik.Reporting.Sorting(string.Format("= Fields.{0}", item.EntityListViewColumn.RelativeColumnName), Telerik.Reporting.SortDirection.Asc));


                var newTotalTableGroup = new TableGroup();
                newTotalTableGroup.Name = "total_row_" + item.EntityListViewColumn.Alias;
                var totaltextbox = new TextBox();
                totaltextbox.Name  = "totalrow" + item.EntityListViewColumn.Alias;
                totaltextbox.Size  = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(0.800000011920929D), Telerik.Reporting.Drawing.Unit.Inch(0.20000000298023224D));
                totaltextbox.Value = "جمع";
                ReportStyles.SetCrossTabRowHeader(totaltextbox.Style);
                crosstab.Items.Add(totaltextbox);
                newTotalTableGroup.ReportItem = totaltextbox;



                prevRowDataTableGroup  = newDataTableGroup;
                prevRowTotalTableGroup = newTotalTableGroup;
            }
            crosstab.RowGroups.Add(prevRowDataTableGroup);
            crosstab.RowGroups.Add(prevRowTotalTableGroup);
            return(new Tuple <Report, Crosstab>(report, crosstab));
        }
コード例 #6
0
        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));
        }
コード例 #7
0
        //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));
        }