public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CrystalReport2 rpt = new CrystalReport2();

            rpt.Site = this.Site;
            return(rpt);
        }
예제 #2
0
        private void dataReportLoad()
        {
            DataTable    dt  = new DataTable();
            MySqlCommand cmd = Conex.CreateCommand();

            cmd.CommandText = "SELECT * FROM coche;";
            MySqlDataAdapter adapter = new MySqlDataAdapter(cmd);

            adapter.Fill(dt);
            CrystalReport2 report = new CrystalReport2();

            report.SetDataSource(dt);
            crystalReportViewer1.ReportSource = report;
            crystalReportViewer1.Refresh();
            cmd.Dispose();
            adapter.Dispose();
            dt.Dispose();
            desconectar();
        }