I have an ASP application where user selects a report number, hits a submitt button and a Crystal Report is being shown (4 page report)
User is able to do "one page" paging but not able to go straight to last page (from any other page). From last page user is however able to straight to 1st page.
Code:
Private Sub ShowCrystalReport()
Try
myCrystalReport1.Load(myPath)
myCrystalReport1.SetParameterValue("BatchGuid", ViewState("BatchGuid"))
myCrystalReport1.SetDatabaseLogon(System.Configuration.ConfigurationManager.AppSettings("CrystalReport_UserId"), System.Configuration.ConfigurationManager.AppSettings("CrystalReport_Password"))
CrystalReportViewer1.ReportSource = myCrystalReport1
CrystalReportViewer1.Zoom(90)
Catch ex As Exception
ErrorIndicator = True
End Try
End Sub
Code:
Protected Sub CrystalReportViewer1_Navigate(ByVal source As Object, ByVal e As CrystalDecisions.Web.NavigateEventArgs) Handles CrystalReportViewer1.Navigate
ShowCrystalReport()
End Sub
I read somewhere that portion of the code should go in the page_init, not sure if this is the case and what portion of the code should go here.