Example #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            ReportVBNB rpt = new ReportVBNB();

            rpt.Site = this.Site;
            return(rpt);
        }
Example #2
0
        private void frm_reportVBNB_Load(object sender, EventArgs e)
        {
            ReportVBNB rp = new ReportVBNB();

            rp.SetParameterValue("date_from", date_from);
            rp.SetParameterValue("date_to", date_to);
            string[] connect  = Properties.Settings.Default.Connect.ToString().Split(';');
            string   server   = connect[0].Substring(13);
            string   database = connect[1].Substring(17);
            string   user     = connect[2].Substring(9);
            string   pass     = connect[3].Substring(4);

            rp.DataSourceConnections.Clear();
            rp.DataSourceConnections[0].SetConnection(server, database, false);
            rp.SetDatabaseLogon(user, pass, server, database);
            crystalReportViewer1.ReportSource = rp;
            crystalReportViewer1.Refresh();
        }