예제 #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            ReportViewer    f2 = new ReportViewer();
            TableLogOnInfos reportLogonInfos = new TableLogOnInfos();
            TableLogOnInfo  reportLogonInfo  = new TableLogOnInfo();
            ConnectionInfo  reportConInfo    = new ConnectionInfo();
            Tables          tables           = default(Tables);
            //	Table table = default(Table);
            var with1 = reportConInfo;

            with1.ServerName   = "LAPTOP-19NF5E9";
            with1.DatabaseName = "BankReconciliationDBProNovember";
            with1.UserID       = "sa";
            with1.Password     = "******";
            AllDepositStatementCrystalReport cr = new AllDepositStatementCrystalReport();

            tables = cr.Database.Tables;
            foreach (Table table in tables)
            {
                reportLogonInfo = table.LogOnInfo;
                reportLogonInfo.ConnectionInfo = reportConInfo;
                table.ApplyLogOnInfo(reportLogonInfo);
            }
            f2.crystalReportViewer1.ReportSource = cr;
            this.Visible = false;

            f2.ShowDialog();
            this.Visible = true;
        }
예제 #2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            AllDepositStatementCrystalReport rpt = new AllDepositStatementCrystalReport();

            rpt.Site = this.Site;
            return(rpt);
        }