Ejemplo n.º 1
0
        private void btnViewSoCai_Click(object sender, EventArgs e)
        {
            DataTable nkcTable = this.eMSDBDataSet.tbl_NhatKyChung.Where(n => n.NgayGhiSo.Year == int.Parse(cboYearSoCai.Text) && n.SoTKDU == cboTKSoCai.Text).Select(n => n).CopyToDataTable();

            soCaiReport = new SoCai();
            soCaiReport.SetDataSource(nkcTable);
            crvReport.ReportSource = soCaiReport;
        }
Ejemplo n.º 2
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            SoCai soCaiReport = new SoCai();

            soCaiReport.SetDataSource(eMSDBDataSet);
            soCaiReport.PrintOptions.PaperSize        = CrystalDecisions.Shared.PaperSize.PaperA4;
            soCaiReport.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Portrait;
            soCaiReport.PrintToPrinter(1, false, 1, 1);
            soCaiReport.Dispose();
        }