L
luqman
If I pass a session variable from another page to crystal report viewer and
open a connection 1st time, the report displays fine, however if I click on
Back Button of Browser, change the selection criteria and response.redirect
to crystal report viewer again, it shows blank report.
I have noticed that the selection formula must be passed to crystal report
viewer, before opening the connection, and once the connection is opened, it
is reused 2nd time and ignore the new selection formula, any idea how can I
handle this ?
Is it possible, to close the crystal report connection when user click on
Back Button of Browser ?
I am opening connection with the following code on page_load.
Protected Sub Page_Load(ByVal sender as Object, ByVal e As System.EventArgs)
Handles Me.Load
Dim myConnectionInfo as ConnectionInfo= New ConnectionInfo()
With myConnectionInfo
..UserID="myID"
..Password="myPassword"
..ServerName="myServer"
End With
With CrystalReportSource1
..Report.FileName="myReport"
End With
With CrystalReportViewer1
..ReportSouce=CrystalReportSource1.ReportDocument
..SelectionFormula=myFormula
End With
setDBLogonForReport(myConnectionInfo)
End Sub
Private Sub setDBLogonForReport(ByVal myConnectionInfo as ConnectionInfo)
Dim myTableLogOnInfos As TableLogOnInfos = CrystalReportViewer1.LogOnInfo
For Each myTableLogOnInfo As TableLogOnInfo In myTableLogOnInfos
myTableLogOnInfo.ConnectionInfo = myConnectionInfo
Next
End Sub
Best Regards,
Luqman
open a connection 1st time, the report displays fine, however if I click on
Back Button of Browser, change the selection criteria and response.redirect
to crystal report viewer again, it shows blank report.
I have noticed that the selection formula must be passed to crystal report
viewer, before opening the connection, and once the connection is opened, it
is reused 2nd time and ignore the new selection formula, any idea how can I
handle this ?
Is it possible, to close the crystal report connection when user click on
Back Button of Browser ?
I am opening connection with the following code on page_load.
Protected Sub Page_Load(ByVal sender as Object, ByVal e As System.EventArgs)
Handles Me.Load
Dim myConnectionInfo as ConnectionInfo= New ConnectionInfo()
With myConnectionInfo
..UserID="myID"
..Password="myPassword"
..ServerName="myServer"
End With
With CrystalReportSource1
..Report.FileName="myReport"
End With
With CrystalReportViewer1
..ReportSouce=CrystalReportSource1.ReportDocument
..SelectionFormula=myFormula
End With
setDBLogonForReport(myConnectionInfo)
End Sub
Private Sub setDBLogonForReport(ByVal myConnectionInfo as ConnectionInfo)
Dim myTableLogOnInfos As TableLogOnInfos = CrystalReportViewer1.LogOnInfo
For Each myTableLogOnInfo As TableLogOnInfo In myTableLogOnInfos
myTableLogOnInfo.ConnectionInfo = myConnectionInfo
Next
End Sub
Best Regards,
Luqman