예제 #1
0
        private GrapeCity.ActiveReports.Document.Section.PagesCollection CreatePagesJobStat(int budID, string wbs)
        {
            rprtBudgetJobStat2 rprt = new rprtBudgetJobStat2();
            DataSet            ds;
            CBBudget           bud   = new CBBudget();
            CBProject          proj  = new CBProject();
            CBCustomer         cust  = new CBCustomer();
            CBLocation         loc   = new CBLocation();
            CBState            state = new CBState();

            bud.Load(budID);
            proj.Load(bud.ProjectID);
            cust.Load(proj.CustomerID);
            loc.Load(proj.LocationID);
            state.Load(loc.StateID);

            ds = CBBudget.GetBudgetJobstatForReport(budID, wbs);

            rprt.SetTitles(cust.Name + " / " + loc.City + "," + state.Abbrev, proj.Description, proj.Number, bud.GetNumber(), wbs);
            rprt.DataSource = ds;
            rprt.DataMember = "Table";

            rprt.Run(false);

            return(rprt.Document.Pages);
        }
예제 #2
0
        public void PreviewJobStat(int budID, string wbs)
        {
            FPreviewAR         pv   = new FPreviewAR();
            rprtBudgetJobStat2 rprt = new rprtBudgetJobStat2();
            DataSet            ds;
            CBBudget           bud   = new CBBudget();
            CBProject          proj  = new CBProject();
            CBCustomer         cust  = new CBCustomer();
            CBLocation         loc   = new CBLocation();
            CBState            state = new CBState();

            bud.Load(budID);
            proj.Load(bud.ProjectID);
            cust.Load(proj.CustomerID);
            loc.Load(proj.LocationID);
            state.Load(loc.StateID);

            ds = CBBudget.GetBudgetJobstatForReport(budID, wbs);

            rprt.SetTitles(cust.Name + " / " + loc.City + "," + state.Abbrev, proj.Description, proj.Number, bud.GetNumber(), wbs);
            rprt.DataSource = ds;
            rprt.DataMember = "Table";

            pv.projNumber = proj.Number; //**************************** added 6/27/2015 //****Commented on 6/29

            pv.ViewReport(rprt);
            pv.ShowDialog();
        }