private void SetReportHeader(Report report)
        {
            var reportHeader = new ReportHeaderSection();

            reportHeader.Height = Telerik.Reporting.Drawing.Unit.Cm(1.5);

            reportHeader.Name = "reportHeader";
            ReportStyles.SetChartReportHeaderStyle(reportHeader.Style);
            report.Items.Add(reportHeader);

            var titleWidth   = Unit.Cm(4);
            var titleHeight  = Unit.Cm(1);
            var titleTextBox = new TextBox();

            titleTextBox.Location = new Telerik.Reporting.Drawing.PointU(reportWidth - titleWidth, Telerik.Reporting.Drawing.Unit.Cm(0));
            titleTextBox.Name     = "txtTitle";
            //titleTextBox.Docking = DockingStyle.Top;
            titleTextBox.Width  = titleWidth;
            titleTextBox.Height = titleHeight;


            ReportStyles.SetReportTitleStyle(titleTextBox.Style);
            titleTextBox.Value = ChartReportReportDTO.ReportTitle;
            reportHeader.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
                titleTextBox
            });
        }
        private void SetReportHeader(Report report, List <ColumnSizeLocation> columnsSizeLocation)
        {
            var reportHeader = new ReportHeaderSection();

            reportHeader.Height = Telerik.Reporting.Drawing.Unit.Cm(1.5);

            reportHeader.Name = "reportHeader";
            ReportStyles.SetReportHeaderStyle(reportHeader.Style, ReportLevel);
            report.Items.Add(reportHeader);

            var titleWidth   = Unit.Cm(4);
            var titleHeight  = Unit.Cm(1);
            var titleTextBox = new TextBox();

            titleTextBox.Location = new Telerik.Reporting.Drawing.PointU(reportWidth - titleWidth, Telerik.Reporting.Drawing.Unit.Cm(0));
            titleTextBox.Name     = "txtTitle";
            //titleTextBox.Docking = DockingStyle.Top;
            titleTextBox.Width  = titleWidth;
            titleTextBox.Height = titleHeight;


            ReportStyles.SetReportTitleStyle(titleTextBox.Style);
            titleTextBox.Value = ListReportReportDTO.ReportTitle;

            //بعدا درست شود یک تکست باکس که مقدارش برابر با string.Format("= Parameters.{0}.Value", param.Name) باشد اضافه شود
            //  string paramHeader = "";
            //if (report.ReportParameters.Count > 0)
            //{
            //    foreach (var param in report.ReportParameters)
            //    {
            //        paramHeader += (paramHeader == "" ? "" : ",") + param.Name + "=" + string.Format("= Parameters.{0}.Value", param.Name); ;
            //    }

            //}
            //if (paramHeader != "")
            //    titleTextBox.Value += paramHeader;



            reportHeader.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
                titleTextBox
            });
        }