Esempio n. 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            ctrForTestForm rpt = new ctrForTestForm();

            rpt.Site = this.Site;
            return(rpt);
        }
Esempio n. 2
0
        private void TestForm1_Load(object sender, EventArgs e)
        {
            string         connectionString = ConfigurationManager.ConnectionStrings["db_QuanLyBanHangThietBiMayTinh"].ConnectionString;
            SqlConnection  cnn = new SqlConnection(connectionString);
            SqlCommand     cmd = new SqlCommand("test", cnn);
            SqlDataAdapter dap = new SqlDataAdapter(cmd);

            DataTable dt = new DataTable();

            dap.Fill(dt);
            ctrForTestForm report = new ctrForTestForm();

            report.SetDataSource(dt);
            //TestForm1 reportForm = new TestForm1();
            crystalReportViewer1.ReportSource = report;
            //reportForm.ShowDialog();
        }