Trying to show a Crystal Report at WebForm1.aspx  
Author Message
Big George





PostPosted: 2006-8-10 22:13:02 Top

dotnet-framework-aspnet, Trying to show a Crystal Report at WebForm1.aspx Trying to show a Crystal Report at WebForm1.aspx:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Not Page.IsPostBack Then
showReport()

End If
End Sub

Private Sub showReport()
' Filling DataTable
'...
crReportDocument.SetDataSource(MyDataTable)
CrystalReportViewer1.ReportSource = crReportDocument

End Sub

Crystal Report shows on the web page very well. But if you click on
link page number 2, trying to get the next page, WebForm1.aspx will be
reloaded again, as page.ispostback. Then I can't see any more pages but
page1 of my Crystal Report. How could I show a Crystal Report, please?

 
Big Charles





PostPosted: 2006-8-11 5:23:00 Top

dotnet-framework-aspnet >> Trying to show a Crystal Report at WebForm1.aspx Using Session is the only way ?
Like:

'oRpt is a ReportClass
If Not Page.IsPostBack Then

Me.oRpt = context.Items("oRpt")
Session("oRpt") = Me.oRpt

showReport()

Else
CrystalReportViewer1.ReportSource = Session("oRpt")
End If

End Sub

And performance?