Se si stà sviluppando in ASP.NET e si vuole caricare un report sviluppato con Crystal Reports, può capitare che non riesca a caricare oltre la seconda pagine. Per risolvere questo problema, ho adottato la seguente soluzione:
Private Sub CaricaReport()
'Istruzioni per il caricamento del Report
...............
...............
...............
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Session("ReportGiaCaricato") Is Nothing Then
CaricaReport()
Session("ReportGiaCaricato") = 1
End If
End Sub
Private Sub CRViewer_Init(sender As Object, e As System.EventArgs) Handles CRViewer.Init
CaricaReport()
End Sub
Private Sub CRViewer_Unload(sender As Object, e As System.EventArgs) Handles CRViewer.Unload
Session.Remove("ReportGiaCaricaro")
End Sub