Joined: 06 Feb 2007
Online Status: Offline
Posts: 1
Topic: subreport navigation Posted: 06 Feb 2007 at 8:12am
Hello guys,
I've a problem with subreport navigation button, i designed a report with on demand subreport the subreport contains 2 pages when I click on the subreport i got the first page then when I click on the right arrow (to show next page) I got the first page of the main report and that using the visual studio (It's an asp page) asp.net.
It works from the Crystal report , but from the asp page not.
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Posted: 06 Feb 2007 at 9:15am
This is a common problem with ASP.NET and Crystal Reports showing the wrong page. To fix it you have to save the entire report object into the Session() collection. In the OnPageLoad event, check for IsPostBack and if so, then get the report out of the Session collection. Otherwise every time the page refreshes it tries to rebuild the report from scratch each time and loses track of which page you were last on. Oh yeah- you should also try putting your report instantiation code in the PageInit event.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
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