protected void btnGenerarReporte_Click(object sender, EventArgs e) { DateTime?fechaInicio = null; DateTime?fechaFin = null; if (txtFechaInicioVigencia.Text != "") { fechaInicio = DateTime.ParseExact(txtFechaInicioVigencia.Text, "yyyy/MM/dd", System.Globalization.CultureInfo.InvariantCulture); } if (txtFechaFinVigencia.Text != "") { fechaFin = DateTime.ParseExact(txtFechaFinVigencia.Text, "yyyy/MM/dd", System.Globalization.CultureInfo.InvariantCulture); } DataTable dsReporte = Reporte.GenerarReporteGeneralPagos(Utils.ObtenerIdsSeleccionados(lbxCompania), Utils.ObtenerIdsSeleccionados(lbxProducto), Utils.ObtenerIdsSeleccionados(lbxPagadurias), Utils.ObtenerIdsSeleccionados(lbxEstadoNegocio), Utils.ObtenerIdsSeleccionados(lbxLocalidad), Utils.ObtenerIdsSeleccionados(lbxConvenio), Utils.ObtenerIdsSeleccionados(lbxDepartamento), Utils.ObtenerIdsSeleccionados(lbxCiudad), fechaInicio, fechaFin); Utils.DeshabilitarFormatoExportacion(rvReporte, new string[] { "PDF", "WORD", "WORDOPENXML" }); rvReporte.ProcessingMode = ProcessingMode.Local; rvReporte.LocalReport.ReportPath = Server.MapPath("~/App_Code/Reportes/ReporteGeneralPagos.rdlc"); ReportDataSource datasourceResultado1 = new ReportDataSource("dsReporte", dsReporte); rvReporte.LocalReport.DataSources.Clear(); rvReporte.LocalReport.DataSources.Add(datasourceResultado1); }