Ejemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CrystalReport2 rpt = new CrystalReport2();

            rpt.Site = this.Site;
            return(rpt);
        }
Ejemplo n.º 2
0
        private void test_Load(object sender, EventArgs e)
        {
            common cmn = new common();

            using (MySqlConnection conn = new MySqlConnection(cmn.strcon))
            {
                conn.Open();
                MySqlDataAdapter sda = new MySqlDataAdapter("select * from v_sales where salesID = 'XS-2021-02-22-Pzkz'", conn);
                DataSet          ds  = new DataSet("ds");
                sda.Fill(ds, "test");
                CrystalReport2 rd = new CrystalReport2();

                rd.SetDataSource(ds.Tables["test"]);
                this.crystalReportViewer1.ReportSource = rd;
            }
        }