Print Page | Close Window

subreport navigation

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=200
Printed Date: 28 Apr 2024 at 4:07am


Topic: subreport navigation
Posted By: me5999
Subject: subreport navigation
Date Posted: 06 Feb 2007 at 8:12am

Cry

 
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.
 
Please help



Replies:
Posted By: BrianBischof
Date 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>



Print Page | Close Window