private void frmVisorE_Load(object sender, EventArgs e) { if (this.Tabla.Rows.Count != 0) { if (eReporte == Reporte.ObraSocial) { Reportes.crObraSocial1 Doc = new Reportes.crObraSocial1(); Doc.SetDataSource(this.Tabla); crVisor.ReportSource = Doc; } else if (eReporte == Reporte.Diagnostico) { Reportes.crDiagnosticos Doc = new Reportes.crDiagnosticos(); Doc.SetDataSource(this.Tabla); crVisor.ReportSource = Doc; } else if (eReporte == Reporte.Paciente) { Reportes.crPacientes Doc = new Reportes.crPacientes(); Doc.SetDataSource(this.Tabla); crVisor.ReportSource = Doc; } else { } } else { MessageBox.Show("No se encontraron registros", "Atencion"); this.Close(); } }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { crDiagnosticos rpt = new crDiagnosticos(); rpt.Site = this.Site; return(rpt); }