P
pbb
I've got an app I made in asp.net using vb.net and
Crystal 9. I use a little javascript to launch a new
window (a web form in .net with the Crystal Report Viewer
control on it) when the user clicks a button. Everything
works great the first time a report is run, but to run
another report the user has to close the viewer window.
Here is the code I'm using to open the viewer window:
Private Sub btnRunReport_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs)
If Session("boolRunReport") = True Then
Response.Write("<script language='javascript'>" & vbCrLf
& _
"var newWin =window.open(" & """"
& "frmReportViewer.aspx" & _
"""" & "," & """" & "ReportViewer" & """" & _
"," & """"
& "width=780,height=screen.availHeight,left=230,top=0," &
_
"scrollbars=1,resizable=1" & """" & ")" & vbCrLf
& "</script>")
Else
'Launch new report viewer window
Response.Write("<script language='javascript'>" & vbCrLf
& _
"var newWin =window.open(" & """"
& "frmReportViewer.aspx" & _
"""" & "," & """" & "ReportViewer" & """" & "," & """"
& "width=780," & _
"height=screen.availHeight,left=230,top=0,scrollbars=1,"
& _
"resizable=1" & """" & ")" & vbCrLf & "</script>")
Session("boolRunReport") = True
End If
End Sub
A strange thing I noticed yesterday - if I run a report,
then attempt to run another report - the browser "clicks"
like its changing but nothing changes in the window. If I
then click the "Refresh" button on the Crystal viewer,
the new report is displayed! Any help is greatly
appreciated.
Crystal 9. I use a little javascript to launch a new
window (a web form in .net with the Crystal Report Viewer
control on it) when the user clicks a button. Everything
works great the first time a report is run, but to run
another report the user has to close the viewer window.
Here is the code I'm using to open the viewer window:
Private Sub btnRunReport_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs)
If Session("boolRunReport") = True Then
Response.Write("<script language='javascript'>" & vbCrLf
& _
"var newWin =window.open(" & """"
& "frmReportViewer.aspx" & _
"""" & "," & """" & "ReportViewer" & """" & _
"," & """"
& "width=780,height=screen.availHeight,left=230,top=0," &
_
"scrollbars=1,resizable=1" & """" & ")" & vbCrLf
& "</script>")
Else
'Launch new report viewer window
Response.Write("<script language='javascript'>" & vbCrLf
& _
"var newWin =window.open(" & """"
& "frmReportViewer.aspx" & _
"""" & "," & """" & "ReportViewer" & """" & "," & """"
& "width=780," & _
"height=screen.availHeight,left=230,top=0,scrollbars=1,"
& _
"resizable=1" & """" & ")" & vbCrLf & "</script>")
Session("boolRunReport") = True
End If
End Sub
A strange thing I noticed yesterday - if I run a report,
then attempt to run another report - the browser "clicks"
like its changing but nothing changes in the window. If I
then click the "Refresh" button on the Crystal viewer,
the new report is displayed! Any help is greatly
appreciated.