public void LlenaReport() { VentasReportViewer.ProcessingMode = ProcessingMode.Local; VentasReportViewer.Reset(); VentasReportViewer.LocalReport.ReportPath = Server.MapPath(@"~\UI\Reportes\ListadoDeVentas.rdlc"); VentasReportViewer.LocalReport.DataSources.Clear(); VentasReportViewer.LocalReport.DataSources.Add(new ReportDataSource("Ventas", list)); VentasReportViewer.LocalReport.Refresh(); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { DesdeTextBox.Text = DateTime.Now.ToString("yyyy-MM-dd"); HastaTextBox.Text = DateTime.Now.ToString("yyyy-MM-dd"); VentasReportViewer.ProcessingMode = ProcessingMode.Local; VentasReportViewer.Reset(); VentasReportViewer.LocalReport.ReportPath = Server.MapPath(@"~\Reportes\ListVentas.rdlc"); VentasReportViewer.LocalReport.DataSources.Clear(); VentasReportViewer.LocalReport.DataSources.Add(new ReportDataSource("Ventas", Funciones.Ventas(filtrar))); VentasReportViewer.LocalReport.Refresh(); } }