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

            rpt.Site = this.Site;
            return(rpt);
        }
Exemplo n.º 2
0
        public void LoadPhieuKham()
        {
            try
            {
                RptPhieuKham _phieukham = new RptPhieuKham();
                //ParameterValues a = new ParameterValues();
                //ParameterDiscreteValue b = new ParameterDiscreteValue();
                //b.Value = _maphieu;
                //a.Add(b);
                //_phieukham.DataDefinition.ParameterFields["@PK_MaPhieu"].ApplyCurrentValues(a);

                string path = Application.StartupPath + "\\RptPhieuKham.rpt";
                _phieukham.FileName = path;

                _phieukham.SetDatabaseLogon("sa", "dmc3star", "TIENTHANH-PC", "phong_kham_benh");
                _phieukham.SetParameterValue("@PK_MaPhieu", _maphieu);
                //_phieukham.SetDataSource(dt);
                crystalReportViewer1.ReportSource = _phieukham;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }