Joined: 19 May 2008
Location: United States
Online Status: Offline
Posts: 2
Topic: Can't refresh report data Posted: 19 May 2008 at 8:18am
I have a report that takes 2 parameters (StartDate and EndDate). I get the values of these 2 parameters in the BeforeRender event. This is the first event where the values of the parameters provided by me are available (pls correct me if I am wrong). After i get the parameters I modify the data in the table in DB where the report connects to. I am trying to tell the report to refresh its data, but that doesn't happen. Is it to late at this point to refresh the data of the report?
Joined: 19 May 2008
Location: United States
Online Status: Offline
Posts: 2
Posted: 19 May 2008 at 10:35am
I did it eventually. I'll write the solution for my problem here maybe there will be somebody that will need it. I said I can only retrieve the values of the parameters in the BeforeRender event of the CrystalReportViewer object. That's not true though. Once you post the page back to the server you can retrieve the collection of values from this.Page.Request.Form collection. Therefore I was able to retrieve the StartDate and EndDate pretty early in the lifecycle process of the page and now I am saving the data in the DB and the report shows the updated data. This is how the code looks like:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum