Quantcast
Channel: SQL Server Reporting Services
Viewing all articles
Browse latest Browse all 1418

Report Not Updating / Refreshing

$
0
0

We have a .aspx page using the Report Viewer control.  The user selects an item from the dropdown list, and the event is fired to get the data, then display the data in the defined report.  The first time I select an item, it works great.  Every subsequent selection, the data is grabbed correctly, I see the page refresh, but the report still shows the first item i selected, it is not refreshed or updated.  Here is my code (what I find odd, is this is how I do it on another .aspx page and it works great.  In fact, the code was a cut / paste and only changed the ReportDataSource and ReportPath.  Not sure why it isn't working on this page.  But on every selection, I can see that the fundCodes value have been updated and reflect the right data to display, just that the Report isn't updated on the web-page

//---------------------------------------------------------------------------------
//  Get Fund Code Data
//---------------------------------------------------------------------------------
fundCodes = FundCode.GetFundCodeAccountBalance(accountID);
//---------------------------------------------------------------------------------
//  Set Report
//---------------------------------------------------------------------------------
ReportDataSource rds = new ReportDataSource("dsAccountingViewIndividualAccount", fundCodes);
ReportViewer.LocalReport.DataSources.Add(rds);
ReportViewer.LocalReport.ReportPath = Server.MapPath("~/Reports/AccountingViewIndividualAccount.rdlc");
ReportParameter rp = new ReportParameter("rpAccountName", accountName);
ReportViewer.LocalReport.SetParameters(new ReportParameter[] { rp });
ReportViewer.LocalReport.Refresh();


Viewing all articles
Browse latest Browse all 1418

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>