private void vpEventos_Animal_Load(object sender, EventArgs e) { try { if (Animal == null) { EventoAnimal_DescSubevento_Negocio eventoAnimalDescNegocio = new EventoAnimal_DescSubevento_Negocio(); rptEvento_Animal reporte = new rptEvento_Animal(); reporte.SetParameterValue("@id_tambo", Principal.Tambo.Id_tambo); reporte.SetDatabaseLogon("abcd", "123456"); crvEvento_Animal.ReportSource = reporte; } else { EventoAnimal_DescSubevento_Negocio eventoAnimalDescNegocio = new EventoAnimal_DescSubevento_Negocio(); rptEventoXAnimal reporte = new rptEventoXAnimal(); reporte.SetParameterValue("@id_tambo", Principal.Tambo.Id_tambo); reporte.SetParameterValue("@rp", Animal.Rp); reporte.SetDatabaseLogon("abcd", "123456"); crvEvento_Animal.ReportSource = reporte; } } catch (Exception ex) { MessageBox.Show(ex.Message, "Ocurrió un error", MessageBoxButtons.OK); } }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { rptEvento_Animal rpt = new rptEvento_Animal(); rpt.Site = this.Site; return(rpt); }