예제 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rptMembershipMainPageNonPayroll rpt = new rptMembershipMainPageNonPayroll();

            rpt.Site = this.Site;
            return(rpt);
        }
예제 #2
0
        private void label9_Click(object sender, EventArgs e)
        {
            //All ACTIVE
            CrystalDecisions.Shared.TableLogOnInfo li;

            //Print Purposes
            using (SqlConnection con = new SqlConnection(global.connectString()))
            {
                con.Open();

                //Change from Active Members to Non-Payroll Members
                SqlDataAdapter adapter = new SqlDataAdapter("SELECT * FROM vw_MembershipReport where isActive = 1 and isApprove = 1 and Company_Code = 'COMP010'", con);



                DataTable dt = new DataTable();
                DataSet   ds = new DataSet();

                ReportsForms.rptMembershipMainPageNonPayroll cr = new ReportsForms.rptMembershipMainPageNonPayroll();
                ReportsForms.rptMembershipMain rpt = new ReportsForms.rptMembershipMain();

                li = new TableLogOnInfo();

                li.ConnectionInfo.IntegratedSecurity = false;

                adapter.Fill(ds, "vw_MembershipReport");
                dt = ds.Tables["vw_MembershipReport"];
                cr.SetDataSource(ds.Tables["vw_MembershipReport"]);
                cr.SetParameterValue("status", "Non-Payroll Members");

                //cr.SetDatabaseLogon("sa", "SYSADMIN", "192.168.255.176", "PECCI-NEW");
                cr.SetDatabaseLogon(global.username, global.pass, global.datasource, global.initialCatalog);

                rpt.crystalReportViewer1.ReportSource = cr;
                rpt.ShowDialog();
            }
        }