private SubReport GetExistingOrCreateNewSubReport(int?subReportId, int?appBudgetServiceId, int?mainReportId)
        {
            var subReport = _db.SubReports.SingleOrDefault(f => f.Id == subReportId || (f.AppBudgetServiceId == appBudgetServiceId && f.MainReportId == mainReportId));

            if (subReport == null)
            {
                var mainReport = _db.MainReports.Where(Permissions.MainReportsFilter).SingleOrDefault(f => f.Id == mainReportId);
                if (mainReport == null)
                {
                    throw new Exception("Main report id " + mainReportId + " not found.");
                }

                var appbudgetservice = _db.AppBudgetServices.Where(Permissions.AppBudgetServicesFilter).Single(f => f.Id == appBudgetServiceId);
                if (appbudgetservice == null)
                {
                    throw new Exception("Budget service id " + appBudgetServiceId + " not found.");
                }

                subReport = new SubReport()
                {
                    AppBudgetServiceId = appBudgetServiceId.Value,
                    MainReportId       = mainReportId.Value
                };
                _db.SubReports.AddObject(subReport);
                _db.SaveChanges();
            }

            return(subReport);
        }
예제 #2
0
        private void bdelete_Click(object sender, EventArgs e)
        {
            // Ask confirmation
            if (MessageBox.Show(Translator.TranslateStr(312),
                                Translator.TranslateStr(729), MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == DialogResult.No)
            {
                return;
            }
            TreeNode nnode = FindSelectedNode();

            if (nnode.Tag is SubReport)
            {
                SubReport sub = (SubReport)nnode.Tag;
                FReport.DeleteSubReport(sub);
                RefreshInterface();
                return;
            }
            if (nnode.Tag is Section)
            {
                SubReport subrep = FindSelectedSubReport();
                Section   sec    = (Section)nnode.Tag;
                sec.SubReport.DeleteSection(sec);
                RefreshInterface();
                SelectItem(subrep, false);
            }
        }
예제 #3
0
        private void StructureSelectionChange(object sender, EventArgs args)
        {
            SubReport nsubreport = fstructure.FindSelectedSubReport();

            if (subreportedit.SubReport != nsubreport)
            {
                subreportedit.SetSubReport(FReport, nsubreport);
            }
            if ((fstructure.FindSelectedNode().Tag is Section))
            {
                Section sec = (Section)fstructure.FindSelectedNode().Tag;
                subreportedit.ClearSelection();
                subreportedit.SelectedItems.Add(sec.SelectionIndex, sec);
                subreportedit.SelectedSection = sec;
                AfterSelectDesign(this, null);
                subreportedit.parentcontrol.Invalidate();
            }
            else
            if ((fstructure.FindSelectedNode().Tag is ReportItem))
            {
                ReportItem sub = (ReportItem)fstructure.FindSelectedNode().Tag;
                subreportedit.ClearSelection();
                AfterSelectDesign(this, null);
            }
        }
예제 #4
0
        public Size Measure(Cairo.Context c, MonoReports.Model.Controls.Control control)
        {
            SubReport subreport  = control as SubReport;
            Rectangle borderRect = new Rectangle(subreport.Location.X, subreport.Location.Y, subreport.Width, subreport.Height);

            return(new MonoReports.Model.Size(borderRect.Width, borderRect.Height));
        }
예제 #5
0
        public static ReportSource GetSubReportSource(SubReport subReport, object model)
        {
            InstanceReportSource reportSource = null;
            Dictionary <string, Func <object, Report> > subReportDelegates;
            var report = subReport.Report;

            if (ReportDelegates.TryGetValue(report, out subReportDelegates))
            {
                Func <object, Report> subReportDelegate;
                if (subReportDelegates.TryGetValue(subReport.Name, out subReportDelegate))
                {
                    subReportDelegates.Remove(subReport.Name);
                    if (!subReportDelegates.Any())
                    {
                        ReportDelegates.Remove(report);
                    }

                    var reportDocument = subReportDelegate(model);
                    reportSource = new InstanceReportSource
                    {
                        ReportDocument = reportDocument
                    };
                }
            }

            return(reportSource);
        }
예제 #6
0
        public void SubReportsFilterTest()
        {
            User user = new User()
            {
                AgencyId = 1, RegionId = 1, RoleId = (int)FixedRoles.RegionOfficer
            };
            IPermissionsBase       target           = PermissionsFactory.GetPermissionsFor(user);
            Func <SubReport, bool> SubReportsFilter = target.SubReportsFilter.Compile();
            SubReport param = new SubReport()
            {
                AppBudgetService = new AppBudgetService()
                {
                    Agency = new Agency()
                    {
                        AgencyGroup = new AgencyGroup()
                        {
                            Country = new Country()
                            {
                                RegionId = 0
                            }
                        }
                    }
                }
            };

            Assert.IsFalse(SubReportsFilter(param));
            param.AppBudgetService.Agency.AgencyGroup.Country.RegionId = 1;
            Assert.IsTrue(SubReportsFilter(param));
        }
예제 #7
0
 private void StructureChange(object sender, EventArgs args)
 {
     if (FReport.SubReports.IndexOf(CurrentSubReport) < 0)
     {
         CurrentSubReport = FReport.SubReports[0];
     }
     subreportedit.SetSubReport(FReport, CurrentSubReport);
 }
예제 #8
0
        private void mstrucaddsubreport_Click(object sender, EventArgs e)
        {
            // Add a new subreport
            SubReport sub = FReport.AddSubReport();

            RefreshInterface();
            SelectItem(sub, false);
        }
예제 #9
0
 private void ButtonDetail_Click(object sender, EventArgs e)
 {
     if (SubReport == null)
     {
         throw new InvalidProgramException("Sub report is not set.");
     }
     SubReport.Show();
     SubReport.RefreshGrid();
 }
예제 #10
0
        public IEnumerable <ValidationResult> Validate(ValidationContext validationContext)
        {
            //create the store subreport
            var subReport = new SubReport();

            foreach (var result in subReport.Validate(validationContext))
            {
                yield return(result);
            }
        }
예제 #11
0
 public SubreportView(MonoReports.Model.Controls.SubReport subreport, SectionView parentSection) : base(subreport)
 {
     this.subreport     = subreport;
     this.ParentSection = parentSection;
     AbsoluteBound      = new Rectangle(parentSection.AbsoluteDrawingStartPoint.X + subreport.Location.X, parentSection.AbsoluteDrawingStartPoint.Y + subreport.Location.Y, subreport.Width, subreport.Height);
     SubreportRenderer  = new SubreportRenderer()
     {
         DesignMode = true
     };
 }
예제 #12
0
 public void ShowSubReport()
 {
     if (SubReport == null)
     {
         throw new InvalidProgramException("Sub report is not set.");
     }
     SubReport.RefreshGrid();
     SubReport.Show();
     SubReport.Focus();
 }
        public ActionResult Index()
        {
            List <GroupReport> report = new List <GroupReport>();

            try
            {
                List <int> fromCities = (from plan in db.Plans
                                         join fromCt in db.Cities on plan.CityFromId equals fromCt.Id
                                         select fromCt.Id).Distinct().ToList();

                foreach (var city in fromCities)
                {
                    GroupReport reportRow = new GroupReport();
                    string      cityName  = db.Cities.Where(c => c.Id == city).First().CityName;
                    reportRow.DepartureCity = cityName;

                    var plans = from plan in db.Plans
                                where plan.CityFromId == city
                                select plan;
                    int totalActualTransportations  = 0;
                    int totalPlannedTransportations = 0;
                    List <SubReport> subReport      = new List <SubReport>();
                    foreach (var pln in plans)
                    {
                        SubReport subRow      = new SubReport();
                        string    arrivalCity = db.Cities.Where(c => c.Id == pln.CityToId).First().CityName;
                        subRow.ArrivalCity = arrivalCity;

                        int actualTransportations = (from tr in db.Transportations
                                                     where tr.PlanId == pln.Id
                                                     select tr).Count();

                        subRow.ActualTransportations = actualTransportations;
                        totalActualTransportations  += actualTransportations;

                        subRow.PlannedTransportations = pln.PlannedTransportations;
                        totalPlannedTransportations  += pln.PlannedTransportations;

                        subReport.Add(subRow);
                    }
                    reportRow.PlannedTransportations = totalPlannedTransportations;
                    reportRow.ActualTransportations  = totalActualTransportations;
                    reportRow.Row = subReport;
                    report.Add(reportRow);
                }
            }
            catch (Exception ex)
            {
                Logger.Log.Error(ex);
            }
            ViewBag.Message = "Group report page.";
            return(View(report));
        }
예제 #14
0
        /// <summary>
        /// Handles the OpeningRecordSet event of the query control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="OpeningRecordSetEventArgs"/> instance containing the event data.</param>
        /// <exception cref="System.NotImplementedException"></exception>
        protected void mainQuery_OpeningRecordSet(object sender, OpeningRecordSetEventArgs e)
        {
            e.RecordSet = new DataTableRecordSet(_personGroupAddressDataTable);
            SubReport innerReport = e.LayoutWriter.DocumentLayout.GetReportElementById("InnerReport") as SubReport;

            if (innerReport == null)
            {
                throw new MissingReportElementException("Report requires a QueryElement named 'InnerReport'");
            }

            innerReport.Query.OpeningRecordSet += innerReport_OpeningRecordSet;
        }
예제 #15
0
        public void Render(Cairo.Context c, MonoReports.Model.Controls.Control control)
        {
            SubReport subreport = control as SubReport;
            Rectangle borderRect;

            c.Save();
            borderRect = new Rectangle(subreport.Location.X, subreport.Location.Y, subreport.Width, subreport.Height);
            c.ClipRectangle(borderRect);
            borderRect = new Rectangle(subreport.Location.X, subreport.Location.Y, subreport.Width, subreport.Height);
            c.FillRectangle(borderRect, subreport.BackgroundColor.ToCairoColor());
            c.Restore();
        }
 private Service GetService(SubReport subReport)
 {
     if (subReport.AppBudgetService == null || subReport.AppBudgetService.Service == null)
     {
         var q = from a in _db.AppBudgetServices
                 where a.Id == subReport.AppBudgetServiceId
                 select a.Service;
         return(q.Single());
     }
     else
     {
         return(subReport.AppBudgetService.Service);
     }
 }
    void GenerateBioData(double PID)
    {
        if (this.User.MenuList.ContainsKey("2,36,2") == false)
        {
            Response.Write("<b>Insufficient previlege to view lawyer bio-data.");
            Response.End();
            return;
        }

        CrystalReport report = new CrystalReport(Server.MapPath("~/MODULES/LJMS/REPORTS/LawyerBioData.rpt"), "LJMS_ADMIN", "LJMS_ADMIN");

        report.SelectionCriteria = " {VW_PERSON_ADDRESS_INFO.P_ID} = " + PID.ToString();

        SubReport Phone = new SubReport();

        Phone.SubReportName = "EmpPhone";
        Phone.ParamList.Add(new ReportParameter("P_P_ID", PID));
        Phone.ParamList.Add(new ReportParameter("P_ACTIVE", "Y"));
        report.SubReportList.Add(Phone);

        SubReport PermAddress = new SubReport();

        PermAddress.SubReportName = "EmpPermAddress";
        PermAddress.ParamList.Add(new ReportParameter("P_P_ID", PID));
        PermAddress.ParamList.Add(new ReportParameter("P_ACTIVE", "Y"));
        report.SubReportList.Add(PermAddress);

        SubReport Email = new SubReport();

        Email.SubReportName = "EmpEmail";
        Email.ParamList.Add(new ReportParameter("P_P_ID", PID));
        Email.ParamList.Add(new ReportParameter("P_ACTIVE", "Y"));
        report.SubReportList.Add(Email);

        SubReport TempAddress = new SubReport();

        TempAddress.SubReportName = "EmpTempAddress";
        TempAddress.ParamList.Add(new ReportParameter("P_P_ID", PID));
        TempAddress.ParamList.Add(new ReportParameter("P_ACTIVE", "Y"));
        report.SubReportList.Add(TempAddress);

        Session["LJMSReport"] = report;

        string script = "";

        script += "<script language='javascript' type='text/javascript'>";
        script += "var win=window.open('../ReportForms/CommonReportViewer.aspx', 'popup','width=780,height=500,directories=no,location=no,menubar=no,resizable=1,scrollbars=1,status=yes,toolbar=no');";
        script += "</script>";
        ClientScript.RegisterClientScriptBlock(this.GetType(), "PCS", script);
    }
예제 #18
0
        public override void CreateNewControl(SectionView sectionView)
        {
            var startPoint = sectionView.PointInSectionByAbsolutePoint(designService.StartPressPoint.X, designService.StartPressPoint.Y);

            var subreport = new SubReport {
                Location        = new MonoReports.Model.Point(startPoint.X, startPoint.Y),
                Size            = new Size(50, 20),
                BackgroundColor = new MonoReports.Model.Color(0.5, 0.5, 0.5)
            };
            SubreportView subreportView = sectionView.CreateControlView(subreport) as SubreportView;

            sectionView.Section.Controls.Add(subreport);
            subreportView.ParentSection   = sectionView;
            designService.SelectedControl = subreportView;
        }
예제 #19
0
        private void mstrucaddgroup_Click(object sender, EventArgs e)
        {
            // Ask the name
            string groupname = InputBox.Execute(Translator.TranslateStr(276),
                                                Translator.TranslateStr(277), "").Trim().ToUpper();

            if (groupname.Length > 0)
            {
                SubReport subrep = FindSelectedSubReport();
                if (subrep.IndexOfGroup(groupname) >= 0)
                {
                    MessageBox.Show(Translator.TranslateStr(278));
                    return;
                }
                Section sec = subrep.AddGroup(groupname);
                RefreshInterface();
                SelectItem(sec, false);
            }
        }
예제 #20
0
        public void SubReportsFilterTest()
        {
            User user = new User()
            {
                AgencyId = 1, RoleId = (int)FixedRoles.AgencyUser
            };
            IPermissionsBase       target           = PermissionsFactory.GetPermissionsFor(user);// new PermissionsFactory.AgencyUserPermissions(user); // TODO: Initialize to an appropriate value
            Func <SubReport, bool> SubReportsFilter = target.SubReportsFilter.Compile();
            SubReport sr = new SubReport()
            {
                AppBudgetService = new AppBudgetService()
                {
                    AgencyId = 1
                }
            };

            Assert.IsTrue(SubReportsFilter(sr));
            sr.AppBudgetService.AgencyId = 0; //  disallow another agencies subreports
            Assert.IsFalse(SubReportsFilter(sr));
        }
예제 #21
0
    void Print(int EmpID, int DesID)
    {
        CrystalReport report = new CrystalReport();

        //report.SelectionCriteria = "{vw_emp_posting.EMP_ID}=1";
        report.SelectionCriteria = "{vw_emp_posting.EMP_ID}=" + EmpID.ToString() + " AND  {vw_emp_posting.DES_ID}=" + DesID.ToString();

        report.ReportName = Server.MapPath("~") + "/MODULES/PMS/Reports/EmployeeWiseApplicableLeave.rpt";
        report.UserID     = "PMS_ADMIN";
        report.Password   = "******";

        SubReport sub1 = new SubReport();

        sub1.SubReportName = "By Designation";
        sub1.ParamList.Add(new ReportParameter("p_des_id", System.DBNull.Value));
        sub1.ParamList.Add(new ReportParameter("p_leave_type_id", System.DBNull.Value));

        SubReport sub2 = new SubReport();

        sub2.SubReportName = "By Employee";
        sub2.ParamList.Add(new ReportParameter("p_emp_id", System.DBNull.Value));
        sub2.ParamList.Add(new ReportParameter("p_leave_type_id", System.DBNull.Value));

        report.SubReportList.Add(sub1);
        report.SubReportList.Add(sub2);

        Session["PMSReport"]      = report;
        Session["PmsReportTitle"] = null;

        Session["PmsReportTitle"] = "PMS |Leave For Employee Report";
        string script = "";

        script += "<script language='javascript' type='text/javascript'>";
        script += "var win=window.open('./CommonReportViewer.aspx', 'popup','width=802,height=500,directories=no,location=no,menubar=no,resizable=1,scrollbars=1,status=no,toolbar=no');";
        script += "</script>";
        ClientScript.RegisterClientScriptBlock(this.GetType(), "PCS", script);
    }
예제 #22
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            Cursor.Current = Cursors.WaitCursor;
            try
            {
                setContext(context);
                if (_emailDevice != null)
                {
                    if (context.PropertyDescriptor.Name == "HelperTestEmail")
                    {
                        _emailDevice.SendTestEmail();
                    }
                }
                else if (_fileServerDevice != null)
                {
                    if (context.PropertyDescriptor.Name == "HelperTestConnection")
                    {
                        _fileServerDevice.TestConnection();
                    }
                }
                else if (_metaConnection != null)
                {
                    if (context.PropertyDescriptor.Name == "HelperCheckConnection")
                    {
                        _metaConnection.CheckConnection();
                    }
                    if (context.PropertyDescriptor.Name == "HelperCreateFromExcelAccess")
                    {
                        string accessDriver = "Microsoft Access Driver (*.mdb)";
                        string excelDriver  = "Microsoft Excel Driver (*.xls)";
                        try
                        {
                            List <string> drivers       = Helper.GetSystemDriverList();
                            string        accessDriver2 = "Microsoft Access Driver (*.mdb, *.accdb)";
                            if (drivers.Contains(accessDriver2))
                            {
                                accessDriver = accessDriver2;
                            }
                            string excelDriver2 = "Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)";
                            if (drivers.Contains(excelDriver2))
                            {
                                excelDriver = excelDriver2;
                            }
                        }
                        catch { }

                        OpenFileDialog dlg = new OpenFileDialog();
                        dlg.Title            = "Open an Excel or an MS Access File";
                        dlg.CheckFileExists  = true;
                        dlg.CheckPathExists  = true;
                        dlg.InitialDirectory = _metaConnection.Source.Repository.RepositoryPath;
                        if (dlg.ShowDialog() == DialogResult.OK)
                        {
                            string ext    = Path.GetExtension(dlg.FileName);
                            string driver = "";
                            if (ext == ".xls" || ext == ".xlsx" || ext == ".xlsm" || ext == ".xlsb")
                            {
                                _metaConnection.DatabaseType = DatabaseType.MSExcel;
                                driver = excelDriver;
                            }
                            else if (ext == ".mdb" || ext == ".accdb")
                            {
                                _metaConnection.DatabaseType = DatabaseType.MSAccess;
                                driver = accessDriver;
                            }
                            else
                            {
                                throw new Exception("Please select an Excel or MS Access file");
                            }

                            string path = dlg.FileName.Replace(_metaConnection.Source.Repository.RepositoryPath, Repository.SealRepositoryKeyword);
                            _metaConnection.ConnectionString = string.Format(@"Provider=MSDASQL.1;Extended Properties=""DBQ={0};Driver={{{1}}};""", path, driver);
                            setModified();
                            MessageBox.Show("The connection has been created successfully", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        }
                    }
                }
                else if (_metaTable != null)
                {
                    if (context.PropertyDescriptor.Name == "HelperRefreshColumns")
                    {
                        _metaTable.Refresh();
                        setModified();
                        initEntity(_metaTable);
                    }
                    if (context.PropertyDescriptor.Name == "HelperCheckTable")
                    {
                        _metaTable.CheckTable(null);
                    }
                }
                else if (_metaEnum != null)
                {
                    if (context.PropertyDescriptor.Name == "HelperRefreshEnum")
                    {
                        _metaEnum.RefreshEnum();
                        setModified();
                    }
                }
                else if (_metaColumn != null)
                {
                    if (context.PropertyDescriptor.Name == "HelperCheckColumn")
                    {
                        _metaColumn.MetaTable.CheckTable(_metaColumn);
                    }
                    else if (context.PropertyDescriptor.Name == "HelperCreateEnum")
                    {
                        MetaEnum result = _metaColumn.Source.CreateEnumFromColumn(_metaColumn);
                        _metaColumn.EnumGUID = result.GUID;
                        initEntity(result);
                        setModified();
                    }
                    else if (context.PropertyDescriptor.Name == "HelperShowValues")
                    {
                        try
                        {
                            Cursor.Current = Cursors.WaitCursor;
                            string        result = _metaColumn.MetaTable.ShowValues(_metaColumn);
                            ExecutionForm frm    = new ExecutionForm(null);
                            frm.Text = "Show values";
                            frm.cancelToolStripButton.Visible = false;
                            frm.pauseToolStripButton.Visible  = false;
                            frm.logTextBox.Text            = result;
                            frm.logTextBox.SelectionStart  = 0;
                            frm.logTextBox.SelectionLength = 0;
                            frm.ShowDialog();
                        }
                        finally
                        {
                            Cursor.Current = Cursors.Default;
                        }
                    }
                    else if (context.PropertyDescriptor.Name == "HelperCreateDrillDates")
                    {
                        var year = _metaColumn.MetaTable.Source.AddColumn(_metaColumn.MetaTable);
                        year.DisplayName            = _metaColumn.DisplayName + " Year";
                        year.Type                   = ColumnType.DateTime;
                        year.DateTimeStandardFormat = DateTimeStandardFormat.Custom;
                        year.Format                 = "yyyy";
                        var month = _metaColumn.MetaTable.Source.AddColumn(_metaColumn.MetaTable);
                        month.DisplayName            = _metaColumn.DisplayName + " Month";
                        month.Type                   = ColumnType.DateTime;
                        month.DateTimeStandardFormat = DateTimeStandardFormat.Custom;
                        month.Format                 = "MM/yyyy";
                        if (_metaColumn.MetaTable.Source.Connection.DatabaseType == DatabaseType.Oracle)
                        {
                            year.Name  = string.Format("trunc({0},'year')", _metaColumn.Name);
                            month.Name = string.Format("trunc({0},'month')", _metaColumn.Name);
                        }
                        else if (_metaColumn.MetaTable.Source.Connection.DatabaseType == DatabaseType.MSSQLServer)
                        {
                            year.Name  = string.Format("DATETIME2FROMPARTS(year({0}),1,1,0,0,0,0,0)", _metaColumn.Name);
                            month.Name = string.Format("DATETIME2FROMPARTS(year({0}),month({0}),1,0,0,0,0,0)", _metaColumn.Name);
                        }
                        else if (_metaColumn.MetaTable.Source.Connection.DatabaseType == DatabaseType.MSAccess)
                        {
                            year.Name  = string.Format("DateSerial(DatePart('yyyy',{0}), 1, 1)", _metaColumn.Name);
                            month.Name = string.Format("DateSerial(DatePart('yyyy',{0}), DatePart('m',{0}), 1)", _metaColumn.Name);
                        }
                        year.DrillChildren.Add(month.GUID);
                        month.DrillChildren.Add(_metaColumn.GUID);
                        initEntity(_metaColumn.MetaTable);
                        setModified();
                        MessageBox.Show("A 'Year' column and a 'Month' column have been added to the table with a drill hierarchy.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    else if (context.PropertyDescriptor.Name == "HelperCreateSubReport")
                    {
                        Report report = Report.Create(Repository.Create());
                        //Only on detail view
                        report.Views.Clear();
                        report.AddView(ReportViewTemplate.ModelDetailName);
                        report.Views[0].InitParameters(true);
                        report.Views[0].Parameters.First(i => i.Name == "restriction_button").BoolValue = false;

                        report.Sources.RemoveAll(i => i.MetaSourceGUID != _metaColumn.Source.GUID);

                        if (report.Sources.Count == 0)
                        {
                            throw new Exception("Unable to create the detail report. Please save the Data Source first...");
                        }

                        //And one model
                        ReportModel model = report.Models[0];
                        model.SourceGUID = _metaColumn.Source.GUID;
                        //Add all the element of the table
                        foreach (var el in _metaColumn.MetaTable.Columns.OrderBy(i => i.DisplayOrder))
                        {
                            ReportElement element = ReportElement.Create();
                            element.MetaColumnGUID = el.GUID;
                            element.Name           = el.Name;
                            element.PivotPosition  = (el == _metaColumn ? PivotPosition.Page : PivotPosition.Row);
                            model.Elements.Add(element);
                        }

                        string entityName = _metaColumn.MetaTable.Name;
                        if (entityName.EndsWith("s"))
                        {
                            entityName = entityName.Substring(0, entityName.Length - 1);
                        }
                        string path = Path.Combine(_metaColumn.MetaTable.Source.Repository.SubReportsFolder, Helper.CleanFileName(entityName + " Detail.") + Repository.SealReportFileExtension);
                        path = FileHelper.GetUniqueFileName(path);

                        var sr = new SubReport()
                        {
                            Path = path.Replace(_metaColumn.Source.Repository.RepositoryPath, Repository.SealRepositoryKeyword), Name = entityName + " Detail"
                        };
                        //And the restriction, try to find out the table primary keys
                        try
                        {
                            DataTable schemaTables = ((OleDbConnection)_metaColumn.Source.GetOpenConnection()).GetOleDbSchemaTable(OleDbSchemaGuid.Primary_Keys, null);
                            Helper.DisplayDataTable(schemaTables);
                            foreach (DataRow row in schemaTables.Rows)
                            {
                                string schema = "";
                                if (schemaTables.Columns.Contains("TABLE_SCHEMA"))
                                {
                                    schema = row["TABLE_SCHEMA"].ToString();
                                }
                                else if (schemaTables.Columns.Contains("TABLE_SCHEM"))
                                {
                                    schema = row["TABLE_SCHEM"].ToString();
                                }
                                string fullName = (!string.IsNullOrEmpty(schema) ? _metaColumn.Source.GetTableName(schema) + "." : "") + _metaColumn.Source.GetTableName(row["TABLE_NAME"].ToString());
                                if (row["TABLE_NAME"].ToString() == _metaColumn.MetaTable.Name || fullName == _metaColumn.MetaTable.Name)
                                {
                                    var col = _metaColumn.MetaTable.Columns.FirstOrDefault(i => i.Name.ToLower() == row["COLUMN_NAME"].ToString().ToLower() || i.Name.ToLower().EndsWith("." + row["COLUMN_NAME"].ToString().ToLower()));
                                    if (col != null)
                                    {
                                        sr.Restrictions.Add(col.GUID);
                                    }
                                    else
                                    {
                                        //not all pk available....
                                        sr.Restrictions.Clear();
                                        break;
                                    }
                                }
                            }
                        }
                        catch (Exception ex)
                        {
                            Console.WriteLine(ex.Message);
                        }

                        string message = "";
                        if (sr.Restrictions.Count == 0)
                        {
                            //no PK found, we add the value itself...
                            sr.Restrictions.Add(_metaColumn.GUID);
                            message = "The Sub-Report restriction is based on the Column.";
                        }
                        else
                        {
                            message = "The Sub-Report restrictions are based on the table Primary Keys.";
                        }

                        foreach (var guid in sr.Restrictions)
                        {
                            ReportRestriction restriction = ReportRestriction.CreateReportRestriction();
                            restriction.MetaColumnGUID = guid;
                            restriction.PivotPosition  = PivotPosition.Row;
                            restriction.Prompt         = PromptType.Prompt;
                            restriction.Operator       = Operator.Equal;
                            model.Restrictions.Add(restriction);
                            if (!string.IsNullOrEmpty(model.Restriction))
                            {
                                model.Restriction += "\r\nAND ";
                            }
                            model.Restriction += ReportRestriction.kStartRestrictionChar + restriction.GUID + ReportRestriction.kStopRestrictionChar;
                        }
                        model.InitReferences();

                        report.SaveToFile(path);
                        _metaColumn.SubReports.Add(sr);

                        if (MessageBox.Show(string.Format("A Sub-Report named '{0}' has been created in the dedicated Repository folder.\r\n{1}\r\nDo you want to edit it using a new Report Designer ?", Path.GetFileName(path), message), "Information", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
                        {
                            Process.Start(path);
                        }
                        ;

                        _metaColumn.UpdateEditor();
                        setModified();
                    }
                    else if (context.PropertyDescriptor.Name == "HelperAddSubReport")
                    {
                        OpenFileDialog dlg = new OpenFileDialog();
                        dlg.Filter           = string.Format(Repository.SealRootProductName + " Reports files (*.{0})|*.{0}|All files (*.*)|*.*", Repository.SealReportFileExtension);
                        dlg.Title            = "Select a Sub-Report having prompted restrictions";
                        dlg.CheckFileExists  = true;
                        dlg.CheckPathExists  = true;
                        dlg.InitialDirectory = _metaColumn.Source.Repository.SubReportsFolder;
                        if (dlg.ShowDialog() == DialogResult.OK)
                        {
                            Report report = Report.LoadFromFile(dlg.FileName, _metaColumn.Source.Repository, false);
                            var    sr     = new SubReport()
                            {
                                Path = report.FilePath.Replace(_metaColumn.Source.Repository.RepositoryPath, Repository.SealRepositoryKeyword), Name = Path.GetFileNameWithoutExtension(dlg.FileName)
                            };

                            bool tableOk   = false;
                            var  restrList = new List <ReportRestriction>();
                            foreach (var model in report.Models.Where(i => i.Source.MetaSourceGUID == _metaColumn.Source.GUID))
                            {
                                foreach (var restriction in model.Restrictions)
                                {
                                    foreach (var table in _metaColumn.MetaTable.Source.MetaData.Tables)
                                    {
                                        var col = table.Columns.FirstOrDefault(i => i.GUID == restriction.MetaColumnGUID);
                                        if (col != null)
                                        {
                                            tableOk = true;
                                            if (!restrList.Exists(i => i.MetaColumnGUID == restriction.MetaColumnGUID))
                                            {
                                                restrList.Add(restriction);
                                            }
                                        }
                                    }
                                }
                            }

                            if (!tableOk)
                            {
                                throw new Exception("Unable to add this Sub-Report:\r\nThe report does not contain any restriction...");
                            }

                            var frm = new MultipleSelectForm("Select the restrictions to include", restrList, "DisplayNameEl");
                            //select all by default
                            for (int i = 0; i < frm.checkedListBox.Items.Count; i++)
                            {
                                frm.checkedListBox.SetItemChecked(i, true);
                            }
                            if (frm.ShowDialog() == DialogResult.OK)
                            {
                                foreach (object item in frm.CheckedItems)
                                {
                                    sr.Restrictions.Add(((ReportRestriction)item).MetaColumnGUID);
                                }
                                _metaColumn.SubReports.Add(sr);
                                MessageBox.Show(string.Format("The Sub-Report named '{0}' has been added with {1} restriction(s).", Path.GetFileName(dlg.FileName), sr.Restrictions.Count), "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);

                                _metaColumn.UpdateEditor();
                                setModified();
                            }
                        }
                    }
                    else if (context.PropertyDescriptor.Name == "HelperOpenSubReportFolder")
                    {
                        Process.Start(_metaColumn.Source.Repository.SubReportsFolder);
                    }
                }
                else if (_metaJoin != null)
                {
                    if (context.PropertyDescriptor.Name == "HelperCheckJoin")
                    {
                        _metaJoin.CheckJoin();
                    }
                }
                else if (_model != null)
                {
                    if (context.PropertyDescriptor.Name == "HelperViewJoins")
                    {
                        try
                        {
                            _model.JoinPaths = new StringBuilder();
                            _model.BuildQuery();

                            var frm = new ExecutionForm(null);
                            frm.Text = "List of Joins";
                            frm.cancelToolStripButton.Visible = false;
                            frm.pauseToolStripButton.Visible  = false;
                            frm.logTextBox.Text            = _model.JoinPaths.ToString();
                            frm.logTextBox.SelectionStart  = 0;
                            frm.logTextBox.SelectionLength = 0;
                            frm.ShowDialog();
                        }
                        finally
                        {
                            _model.JoinPaths = null;
                        }
                    }
                }
                else if (_reportView != null)
                {
                    if (context.PropertyDescriptor.Name == "HelperReloadConfiguration")
                    {
                        _reportView.ReloadConfiguration();
                    }
                    else if (context.PropertyDescriptor.Name == "HelperResetParameters")
                    {
                        _reportView.InitParameters(true);
                        setModified();
                    }
                    else if (context.PropertyDescriptor.Name == "HelperResetPDFConfigurations")
                    {
                        _reportView.PdfConfigurations = new List <string>();
                        _reportView.PdfConverter      = null;
                        _reportView.Information       = Helper.FormatMessage("The PDF configuration values have been reset");
                        setModified();
                    }
                    else if (context.PropertyDescriptor.Name == "HelperResetExcelConfigurations")
                    {
                        _reportView.ExcelConfigurations = new List <string>();
                        _reportView.ExcelConverter      = null;
                        _reportView.Information         = Helper.FormatMessage("The Excel configuration values have been reset");
                        setModified();
                    }
                }
                else if (_configuration != null)
                {
                    if (context.PropertyDescriptor.Name == "HelperResetPDFConfigurations")
                    {
                        _configuration.PdfConfigurations = new List <string>();
                        _configuration.PdfConverter      = null;
                    }
                    else if (context.PropertyDescriptor.Name == "HelperResetExcelConfigurations")
                    {
                        _configuration.ExcelConfigurations = new List <string>();
                        _configuration.ExcelConverter      = null;
                    }
                }
                else if (_reportSchedule != null)
                {
                    if (HandlerInterface != null && context.PropertyDescriptor.Name == "HelperEditProperties")
                    {
                        HandlerInterface.EditSchedule(_reportSchedule);
                    }
                    else if (context.PropertyDescriptor.Name == "HelperRunTaskScheduler")
                    {
                        Process.Start(Path.Combine(Environment.SystemDirectory, "taskschd.msc"), "/s");
                    }
                }
                else if (_parameter != null)
                {
                    if (context.PropertyDescriptor.Name == "HelperResetParameterValue")
                    {
                        _parameter.Value = _parameter.ConfigValue;
                        setModified();
                    }
                }
                else if (_security != null)
                {
                    if (context.PropertyDescriptor.Name == "HelperSimulateLogin")
                    {
                        SecurityUser user = new SecurityUser(_security);
                        user.WebUserName = _security.TestUserName;
                        user.WebPassword = _security.TestPassword;
                        if (_security.TestCurrentWindowsUser)
                        {
                            user.WebPrincipal = new WindowsPrincipal(WindowsIdentity.GetCurrent());
                        }
                        user.Authenticate();
                        try
                        {
                            Cursor.Current = Cursors.WaitCursor;
                            ExecutionForm frm = new ExecutionForm(null);
                            frm.Text = "Test a login";
                            frm.cancelToolStripButton.Visible = false;
                            frm.pauseToolStripButton.Visible  = false;
                            frm.logTextBox.Text            = user.AuthenticationSummary;
                            frm.logTextBox.SelectionStart  = 0;
                            frm.logTextBox.SelectionLength = 0;
                            frm.ShowDialog();
                        }
                        finally
                        {
                            Cursor.Current = Cursors.Default;
                        }
                    }
                }
                else if (_widget != null)
                {
                    if (context.PropertyDescriptor.Name == "ExecReportPath")
                    {
                        OpenFileDialog dlg = new OpenFileDialog();
                        dlg.Filter           = string.Format(Repository.SealRootProductName + " Reports files (*.{0})|*.{0}|All files (*.*)|*.*", Repository.SealReportFileExtension);
                        dlg.Title            = "Select report to execute from the Widget";
                        dlg.CheckFileExists  = true;
                        dlg.CheckPathExists  = true;
                        dlg.InitialDirectory = Repository.Instance.ReportsFolder;
                        if (dlg.ShowDialog() == DialogResult.OK)
                        {
                            Report report = Report.LoadFromFile(dlg.FileName, Repository.Instance, false);
                            if (report.ExecutionView == null)
                            {
                                throw new Exception("This report has no view to execute...");
                            }
                            _widget.ExecReportPath = report.FilePath.Replace(Repository.Instance.ReportsFolder, "");
                            _widget.ExecViewGUID   = report.ExecutionView.GUID;
                            _widget.UpdateEditor();
                        }
                    }
                }
            }
            finally
            {
                Cursor.Current = Cursors.Default;
            }

            return(value);
        }
예제 #23
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();
 }
        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);
            }
        }
    void Print(int empID)
    {
        CrystalReport objReport = new CrystalReport();

        //Report objReport = new Report();

        objReport.SelectionCriteria = "{VW_PERSON_ADDRESS_INFO.P_ID} =" + empID.ToString();
        objReport.ReportName        = Server.MapPath("~") + "/MODULES/PMS/Reports/EmployeeBioData.rpt";

        objReport.UserID   = "PMS_ADMIN";
        objReport.Password = "******";

        Session["PMSReport"]      = objReport;
        Session["PmsReportTitle"] = null;
        Session["PmsReportTitle"] = "PMS | Employee Bio-Data";

        //objReport.ParamList.Add(new ReportParameter("OrgName", "PMS"));
        //objReport.ParamList.Add(new ReportParameter("OrgAddress", "PCS"));
        //objReport.ParamList.Add(new ReportParameter("ReportName", "Bio Data"));
        ////objReport.ParamList.Add(new ReportParameter("Date", DateTime.Now.ToShortDateString()));

        SubReport Qualification = new SubReport();

        Qualification.SubReportName = "EmpQualification";
        Qualification.ParamList.Add(new ReportParameter("P_PID", empID));

        SubReport Training = new SubReport();

        Training.SubReportName = "EmpTraining";
        Training.ParamList.Add(new ReportParameter("P_PID", empID));

        SubReport PermAddress = new SubReport();

        PermAddress.SubReportName = "EmpPermAddress";
        PermAddress.ParamList.Add(new ReportParameter("P_P_ID", empID));
        PermAddress.ParamList.Add(new ReportParameter("P_ACTIVE", "Y"));

        SubReport TempAddress = new SubReport();

        TempAddress.SubReportName = "EmpTempAddress";
        TempAddress.ParamList.Add(new ReportParameter("P_P_ID", empID));
        TempAddress.ParamList.Add(new ReportParameter("P_ACTIVE", "Y"));

        SubReport Phone = new SubReport();

        Phone.SubReportName = "EmpPhone";
        Phone.ParamList.Add(new ReportParameter("P_P_ID", empID));
        Phone.ParamList.Add(new ReportParameter("P_ACTIVE", "Y"));

        SubReport Email = new SubReport();

        Email.SubReportName = "EmpEmail";
        Email.ParamList.Add(new ReportParameter("P_P_ID", empID));
        Email.ParamList.Add(new ReportParameter("P_ACTIVE", "Y"));

        SubReport Visit = new SubReport();

        Visit.SubReportName = "EmpVisit";
        Visit.ParamList.Add(new ReportParameter("P_EMP_ID", empID));

        objReport.SubReportList.Add(Qualification);
        objReport.SubReportList.Add(Training);
        objReport.SubReportList.Add(PermAddress);
        objReport.SubReportList.Add(TempAddress);
        objReport.SubReportList.Add(Phone);
        objReport.SubReportList.Add(Email);
        objReport.SubReportList.Add(Visit);

        Session["PMSBioData"] = objReport;

        string script = "";

        script += "<script language='javascript' type='text/javascript'>";
        script += "var win=window.open('./CommonReportViewer.aspx', 'popup','width=802,height=500,directories=no,location=no,menubar=no,resizable=1,scrollbars=1,status=no,toolbar=no');";
        script += "</script>";
        ClientScript.RegisterClientScriptBlock(this.GetType(), "PCS", script);
    }
        private static DeclarationList CreateCurrentDeclarations()
        {
            DeclarationList declarationList = new DeclarationList();
            int             num             = 1;

            declarationList[num++] = IDOwner.GetDeclaration();
            declarationList[num++] = ReportItem.GetDeclaration();
            num++;
            declarationList[num++] = Report.GetDeclaration();
            declarationList[num++] = PageSection.GetDeclaration();
            declarationList[num++] = Line.GetDeclaration();
            declarationList[num++] = Rectangle.GetDeclaration();
            declarationList[num++] = Image.GetDeclaration();
            num++;
            declarationList[num++] = CheckBox.GetDeclaration();
            declarationList[num++] = TextBox.GetDeclaration();
            declarationList[num++] = SubReport.GetDeclaration();
            declarationList[num++] = ActiveXControl.GetDeclaration();
            declarationList[num++] = DataRegion.GetDeclaration();
            num++;
            declarationList[num++] = ReportHierarchyNode.GetDeclaration();
            declarationList[num++] = Grouping.GetDeclaration();
            declarationList[num++] = Sorting.GetDeclaration();
            declarationList[num++] = List.GetDeclaration();
            declarationList[num++] = Pivot.GetDeclaration();
            declarationList[num++] = Matrix.GetDeclaration();
            declarationList[num++] = PivotHeading.GetDeclaration();
            declarationList[num++] = MatrixHeading.GetDeclaration();
            declarationList[num++] = MatrixColumn.GetDeclaration();
            num++;
            declarationList[num++] = MatrixRow.GetDeclaration();
            num++;
            declarationList[num++] = Subtotal.GetDeclaration();
            declarationList[num++] = Table.GetDeclaration();
            declarationList[num++] = TableColumn.GetDeclaration();
            num++;
            declarationList[num++] = TableGroup.GetDeclaration();
            declarationList[num++] = TableRow.GetDeclaration();
            num++;
            declarationList[num++] = OWCChart.GetDeclaration();
            declarationList[num++] = ChartColumn.GetDeclaration();
            num++;
            declarationList[num++] = ReportItemCollection.GetDeclaration();
            declarationList[num++] = ReportItemIndexer.GetDeclaration();
            num++;
            declarationList[num++] = Style.GetDeclaration();
            num++;
            declarationList[num++] = AttributeInfo.GetDeclaration();
            declarationList[num++] = Visibility.GetDeclaration();
            declarationList[num++] = ExpressionInfo.GetDeclaration();
            num++;
            declarationList[num++] = DataAggregateInfo.GetDeclaration();
            num++;
            declarationList[num++] = RunningValueInfo.GetDeclaration();
            num++;
            num++;
            declarationList[num++] = Filter.GetDeclaration();
            num++;
            declarationList[num++] = DataSource.GetDeclaration();
            num++;
            declarationList[num++] = DataSet.GetDeclaration();
            num++;
            declarationList[num++] = ReportQuery.GetDeclaration();
            declarationList[num++] = Field.GetDeclaration();
            num++;
            declarationList[num++] = ParameterValue.GetDeclaration();
            num++;
            num++;
            num++;
            num++;
            declarationList[num++] = ReportSnapshot.GetDeclaration();
            declarationList[num++] = SenderInformation.GetDeclaration();
            declarationList[num++] = InstanceInfo.GetDeclaration();
            declarationList[num++] = ReceiverInformation.GetDeclaration();
            declarationList[num++] = InstanceInfo.GetDeclaration();
            declarationList[num++] = DocumentMapNode.GetDeclaration();
            declarationList[num++] = InfoBase.GetDeclaration();
            declarationList[num++] = OffsetInfo.GetDeclaration();
            declarationList[num++] = InstanceInfo.GetDeclaration();
            declarationList[num++] = ReportItemInstanceInfo.GetDeclaration();
            declarationList[num++] = ReportInstanceInfo.GetDeclaration();
            declarationList[num++] = ReportItemColInstanceInfo.GetDeclaration();
            declarationList[num++] = LineInstanceInfo.GetDeclaration();
            declarationList[num++] = TextBoxInstanceInfo.GetDeclaration();
            declarationList[num++] = RectangleInstanceInfo.GetDeclaration();
            declarationList[num++] = CheckBoxInstanceInfo.GetDeclaration();
            declarationList[num++] = ImageInstanceInfo.GetDeclaration();
            declarationList[num++] = SubReportInstanceInfo.GetDeclaration();
            declarationList[num++] = ActiveXControlInstanceInfo.GetDeclaration();
            declarationList[num++] = ListInstanceInfo.GetDeclaration();
            declarationList[num++] = ListContentInstanceInfo.GetDeclaration();
            declarationList[num++] = MatrixInstanceInfo.GetDeclaration();
            declarationList[num++] = MatrixHeadingInstanceInfo.GetDeclaration();
            declarationList[num++] = MatrixCellInstanceInfo.GetDeclaration();
            declarationList[num++] = TableInstanceInfo.GetDeclaration();
            declarationList[num++] = TableGroupInstanceInfo.GetDeclaration();
            declarationList[num++] = TableRowInstanceInfo.GetDeclaration();
            declarationList[num++] = OWCChartInstanceInfo.GetDeclaration();
            declarationList[num++] = ChartInstanceInfo.GetDeclaration();
            declarationList[num++] = NonComputedUniqueNames.GetDeclaration();
            declarationList[num++] = InstanceInfoOwner.GetDeclaration();
            declarationList[num++] = ReportItemInstance.GetDeclaration();
            num++;
            declarationList[num++] = ReportInstance.GetDeclaration();
            declarationList[num++] = ReportItemColInstance.GetDeclaration();
            declarationList[num++] = LineInstance.GetDeclaration();
            declarationList[num++] = TextBoxInstance.GetDeclaration();
            declarationList[num++] = RectangleInstance.GetDeclaration();
            declarationList[num++] = CheckBoxInstance.GetDeclaration();
            declarationList[num++] = ImageInstance.GetDeclaration();
            declarationList[num++] = SubReportInstance.GetDeclaration();
            declarationList[num++] = ActiveXControlInstance.GetDeclaration();
            declarationList[num++] = ListInstance.GetDeclaration();
            declarationList[num++] = ListContentInstance.GetDeclaration();
            num++;
            declarationList[num++] = MatrixInstance.GetDeclaration();
            declarationList[num++] = MatrixHeadingInstance.GetDeclaration();
            num++;
            declarationList[num++] = MatrixCellInstance.GetDeclaration();
            num++;
            num++;
            declarationList[num++] = TableInstance.GetDeclaration();
            declarationList[num++] = TableRowInstance.GetDeclaration();
            declarationList[num++] = TableColumnInstance.GetDeclaration();
            declarationList[num++] = TableGroupInstance.GetDeclaration();
            num++;
            declarationList[num++] = OWCChartInstance.GetDeclaration();
            declarationList[num++] = ParameterInfo.GetDeclaration();
            num++;
            num++;
            num++;
            declarationList[num++] = InstanceInfo.GetDeclaration();
            num++;
            declarationList[num++] = RecordSetInfo.GetDeclaration();
            declarationList[num++] = RecordRow.GetDeclaration();
            declarationList[num++] = RecordField.GetDeclaration();
            declarationList[num++] = ValidValue.GetDeclaration();
            num++;
            declarationList[num++] = ParameterDataSource.GetDeclaration();
            declarationList[num++] = ParameterDef.GetDeclaration();
            num++;
            declarationList[num++] = ParameterBase.GetDeclaration();
            num++;
            declarationList[num++] = ProcessingMessage.GetDeclaration();
            declarationList[num++] = MatrixSubtotalHeadingInstanceInfo.GetDeclaration();
            declarationList[num++] = MatrixSubtotalCellInstance.GetDeclaration();
            declarationList[num++] = CodeClass.GetDeclaration();
            num++;
            declarationList[num++] = TableDetail.GetDeclaration();
            declarationList[num++] = TableDetailInstance.GetDeclaration();
            num++;
            declarationList[num++] = TableDetailInstanceInfo.GetDeclaration();
            num++;
            declarationList[num++] = Action.GetDeclaration();
            declarationList[num++] = ActionInstance.GetDeclaration();
            declarationList[num++] = Chart.GetDeclaration();
            declarationList[num++] = ChartHeading.GetDeclaration();
            declarationList[num++] = ChartDataPoint.GetDeclaration();
            num++;
            declarationList[num++] = MultiChart.GetDeclaration();
            declarationList[num++] = MultiChartInstance.GetDeclaration();
            num++;
            declarationList[num++] = Axis.GetDeclaration();
            declarationList[num++] = AxisInstance.GetDeclaration();
            declarationList[num++] = ChartTitle.GetDeclaration();
            declarationList[num++] = ChartTitleInstance.GetDeclaration();
            declarationList[num++] = ThreeDProperties.GetDeclaration();
            declarationList[num++] = PlotArea.GetDeclaration();
            declarationList[num++] = Legend.GetDeclaration();
            declarationList[num++] = GridLines.GetDeclaration();
            declarationList[num++] = ChartDataLabel.GetDeclaration();
            declarationList[num++] = ChartInstance.GetDeclaration();
            declarationList[num++] = ChartHeadingInstance.GetDeclaration();
            declarationList[num++] = ChartHeadingInstanceInfo.GetDeclaration();
            num++;
            declarationList[num++] = ChartDataPointInstance.GetDeclaration();
            declarationList[num++] = ChartDataPointInstanceInfo.GetDeclaration();
            num++;
            num++;
            declarationList[num++] = RenderingPagesRanges.GetDeclaration();
            num++;
            declarationList[num++] = IntermediateFormatVersion.GetDeclaration();
            declarationList[num++] = ImageInfo.GetDeclaration();
            declarationList[num++] = ActionItem.GetDeclaration();
            declarationList[num++] = ActionItemInstance.GetDeclaration();
            num++;
            num++;
            declarationList[num++] = DataValue.GetDeclaration();
            declarationList[num++] = DataValueInstance.GetDeclaration();
            num++;
            num++;
            declarationList[num++] = Tablix.GetDeclaration();
            declarationList[num++] = TablixHeading.GetDeclaration();
            declarationList[num++] = CustomReportItem.GetDeclaration();
            declarationList[num++] = CustomReportItemInstance.GetDeclaration();
            declarationList[num++] = CustomReportItemHeading.GetDeclaration();
            declarationList[num++] = CustomReportItemHeadingInstance.GetDeclaration();
            num++;
            num++;
            num++;
            num++;
            declarationList[num++] = CustomReportItemCellInstance.GetDeclaration();
            num++;
            num++;
            declarationList[num++] = DataValueCRIList.GetDeclaration();
            declarationList[num++] = BookmarkInformation.GetDeclaration();
            declarationList[num++] = InstanceInfo.GetDeclaration();
            declarationList[num++] = DrillthroughInformation.GetDeclaration();
            declarationList[num++] = InstanceInfo.GetDeclaration();
            num++;
            declarationList[num++] = CustomReportItemInstanceInfo.GetDeclaration();
            declarationList[num++] = ImageMapAreaInstanceList.GetDeclaration();
            declarationList[num++] = ImageMapAreaInstance.GetDeclaration();
            num++;
            declarationList[num++] = InstanceInfo.GetDeclaration();
            declarationList[num++] = SortFilterEventInfo.GetDeclaration();
            declarationList[num++] = EndUserSort.GetDeclaration();
            num++;
            num++;
            declarationList[num++] = RecordSetPropertyNames.GetDeclaration();
            num++;
            num++;
            num++;
            declarationList[num++] = PageSectionInstance.GetDeclaration();
            num++;
            declarationList[num++] = PageSectionInstanceInfo.GetDeclaration();
            declarationList[num++] = SimpleTextBoxInstanceInfo.GetDeclaration();
            declarationList[num++] = ScopeLookupTable.GetDeclaration();
            num++;
            declarationList[num++] = ReportDrillthroughInfo.GetDeclaration();
            declarationList[num++] = InstanceInfo.GetDeclaration();
            Global.Tracer.Assert(declarationList.Count == num, "(current.Count == index)");
            return(declarationList);
        }
예제 #27
0
 public SubReport Create(SubReport pt)
 {
     pt.ObjectState = ObjectState.Added;
     _unitOfWork.Repository <SubReport>().Insert(pt);
     return(pt);
 }
예제 #28
0
        public override void SetProperty(string pname, Variant newvalue)
        {
            if (pname == Translator.TranslateStr(486))
            {
                FSection.Global = newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(610))
            {
                FSection.AutoExpand = newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(611))
            {
                FSection.AutoContract = newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(940))
            {
                FSection.IniNumPage = newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(277))
            {
                FSection.GroupName = newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(615))
            {
                FSection.ChangeExpression = newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(616))
            {
                FSection.ChangeBool = newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(617))
            {
                FSection.PageRepeat = newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(619))
            {
                FSection.ForcePrint = newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(618))
            {
                FSection.BeginPage = newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(619))
            {
                FSection.SkipPage = newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(620))
            {
                FSection.AlignBottom = newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(308))
            {
                FSection.HorzDesp = newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(1124))
            {
                FSection.VertDesp = newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(926))
            {
                FSection.SkipType = (SkipType)(int)newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(927))
            {
                FSection.SkipToPageExpre = newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(922))
            {
                FSection.SkipExpreH = newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(920))
            {
                FSection.SkipRelativeH = newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(923))
            {
                FSection.SkipExpreV = newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(921))
            {
                FSection.SkipRelativeV = newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(834))
            {
                SubReport nsub  = null;
                Strings   alist = new Strings();
                GetPropertyValues(Translator.TranslateStr(834), alist);
                string nname = "";
                if (!newvalue.IsNull)
                {
                    if (newvalue.IsInteger())
                    {
                        int index = newvalue;
                        if (index < alist.Count)
                        {
                            nname = alist[index];
                        }
                    }
                }
                if (nname.Length > 0)
                {
                    foreach (SubReport newsub in FSection.Report.SubReports)
                    {
                        if (newsub.GetDisplayName(false) == nname)
                        {
                            nsub = newsub;
                            break;
                        }
                    }
                }
                if (nsub != null)
                {
                    FSection.ChildSubReport     = nsub;
                    FSection.ChildSubReportName = nsub.Name;
                }
                else
                {
                    FSection.ChildSubReportName = "";
                    FSection.ChildSubReport     = null;
                }
                return;
            }
            if (pname == Translator.TranslateStr(919))
            {
                FSection.ForcePrint = newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(830))
            {
                FSection.ExternalFilename = newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(861))
            {
                //FSection.GetExternalDataDescription();
                return;
            }
            if (pname == Translator.TranslateStr(1248))
            {
                FSection.BackExpression = newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(639))
            {
                FSection.Stream.SetLength(0);
                byte[] narray = newvalue.GetStream().ToArray();
                FSection.Stream.Write(narray, 0, narray.Length);
                this.UpdatePos();
                return;
            }
            if (pname == Translator.TranslateStr(666))
            {
                FSection.dpires = newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(1250))
            {
                FSection.BackStyle = (BackStyleType)(int)newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(667))
            {
                FSection.DrawStyle = (ImageDrawStyleType)(int)newvalue;
                return;
            }
            if (pname == Translator.TranslateStr(1409))
            {
                FSection.SharedImage = (SharedImageType)(int)newvalue;
                return;
            }

            // inherited
            base.SetProperty(pname, newvalue);
        }
예제 #29
0
 public void Delete(SubReport pt)
 {
     _unitOfWork.Repository <SubReport>().Delete(pt);
 }
예제 #30
0
 public SubReport Add(SubReport pt)
 {
     _unitOfWork.Repository <SubReport>().Insert(pt);
     return(pt);
 }
예제 #31
0
 public void Update(SubReport pt)
 {
     pt.ObjectState = ObjectState.Modified;
     _unitOfWork.Repository <SubReport>().Update(pt);
 }