예제 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rptINGVTHEOCS rpt = new rptINGVTHEOCS();

            rpt.Site = this.Site;
            return(rpt);
        }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            Baocao.rptINGVTHEOCS obj = new Baocao.rptINGVTHEOCS();
            string lenh = "EXEC SP_INGVTHEOCS '" + Program.Macs + "'";

            try
            {
                DataTable tb = Program.ExecSqlDataTable(lenh);
                obj.SetDataSource(tb);
                obj.SetParameterValue("MACS", cbxCoso.Text.ToUpper());
                crystalReportViewer1.ReportSource = obj;
            }
            catch (Exception ex)
            {
                MessageBox.Show("Lỗi! " + ex.Message);
                return;
            }
        }