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

            rpt.Site = this.Site;
            return(rpt);
        }
Пример #2
0
        private void Form5_Load(object sender, EventArgs e)
        {
            //String a = MaPhong(comboBox1.Text);
            cnn.Open();
            String         sql = "select * from v_soluong";
            SqlCommand     cmd = new SqlCommand(sql, cnn);
            SqlDataAdapter da  = new SqlDataAdapter(cmd);
            DataTable      dt  = new DataTable();

            da.Fill(dt);
            CrystalReport6 rp = new CrystalReport6();

            //crystalReportViewer1.C;
            rp.SetDataSource(dt);
            crystalReportViewer1.ReportSource = rp;
            cnn.Close();
        }