Example #1
0
        public FormReporteMedicos()
        {
            InitializeComponent();

            var _medicosBL     = new MedicosBL();
            var bindingSource1 = new BindingSource();

            bindingSource1.DataSource = _medicosBL.ObtenerMedicos();

            var _especialidadesBL = new EspecialidadesBL();
            var bindingSource2    = new BindingSource();

            bindingSource2.DataSource = _especialidadesBL.ObtenerEspecialidades();

            var _jornadasBL    = new JornadasBL();
            var bindingSource3 = new BindingSource();

            bindingSource3.DataSource = _jornadasBL.ObtenerJornadas();

            var reporte = new ReporteMedicos();

            reporte.Database.Tables["Medico"].SetDataSource(bindingSource1);
            reporte.Database.Tables["Especialidad"].SetDataSource(bindingSource2);
            reporte.Database.Tables["Jornada"].SetDataSource(bindingSource3);

            crystalReportViewer1.ReportSource = reporte;
            crystalReportViewer1.RefreshReport();
        }
Example #2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            ReporteMedicos rpt = new ReporteMedicos();

            rpt.Site = this.Site;
            return(rpt);
        }