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

            rpt.Site = this.Site;
            return(rpt);
        }
Example #2
0
        private void crystalReportViewer1_Load(object sender, EventArgs e)
        {
            conn = connect.Getconect();
            conn.Open();
            String str = "select * from TblCars";

            da = new SqlDataAdapter(str, conn);
            // ds = new DataSet();
            Car ds = new Car();

            da.Fill(ds, "TblCars");
            ReportCar rpt = new ReportCar();

            rpt.SetDataSource(ds);
            crystalReportViewer1.ReportSource = rpt;
            crystalReportViewer1.Show();
        }