Example #1
0
        private GrapeCity.ActiveReports.Document.Section.PagesCollection CreatePagesBudgetFormEntry(int budID, string wbs)
        {
            rprtBudgetAccounting rprt = new rprtBudgetAccounting();
            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.GetBudgetAccountingEntryForReport(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);
        }
Example #2
0
        public void PreviewBudgetFormEntry(int budID, string wbs)
        {
            FPreviewAR           pv   = new FPreviewAR();
            rprtBudgetAccounting rprt = new rprtBudgetAccounting();
            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.GetBudgetAccountingEntryForReport(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/29/15

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