public void LlenaReport() { ProductosReportViewer.ProcessingMode = ProcessingMode.Local; ProductosReportViewer.Reset(); ProductosReportViewer.LocalReport.ReportPath = Server.MapPath(@"~\UI\Reportes\ListadoDeProductos.rdlc"); ProductosReportViewer.LocalReport.DataSources.Clear(); ProductosReportViewer.LocalReport.DataSources.Add(new ReportDataSource("Productos", list)); ProductosReportViewer.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"); ProductosReportViewer.ProcessingMode = ProcessingMode.Local; ProductosReportViewer.Reset(); ProductosReportViewer.LocalReport.ReportPath = Server.MapPath(@"~\Reportes\ListProductos.rdlc"); ProductosReportViewer.LocalReport.DataSources.Clear(); ProductosReportViewer.LocalReport.DataSources.Add(new ReportDataSource("Productos", Funciones.Productos(filtrar))); ProductosReportViewer.LocalReport.Refresh(); } }