Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal ActiveX Viewer - Session Time out

Status
Not open for further replies.

mgayb

Programmer
Oct 2, 2002
10
0
0
US
I am using the Crystal 8 ActiveX Viewer in an ASP page. I am setting both my Session(oApp) and Session(oRpt) objects successfully. I am loading a Crystal 8 designed report which contains no database connections (it only contains a label saying this is a test report)

However as soon as we reach the line that says CRViewer.ViewReport I get a "User Session has expired" message followed by the viewer in the browser showing no report. I did try to set the timeout property for the session objects but it did not help or resolve the problem.

Server side script:
===================

If Session("oApp") Is Nothing Then
Session("oApp") = Server.CreateObject("CrystalRuntime.Application")
End If

If Not Session("oRpt") Is Nothing Then
Session("oRpt") = Nothing
End If

Path = Request.ServerVariables("PATH_TRANSLATED")
While (Right(Path, 1) <> &quot;\&quot; And Len(Path) <> 0)
iLen = Len(Path) - 1
Path = Left(Path, iLen)
End While

Session(&quot;oRpt&quot;) = Session(&quot;oApp&quot;).OpenReport(Path & reportname, 1)

Session(&quot;oRpt&quot;).MorePrintEngineErrorMessages = False
Session(&quot;oRpt&quot;).EnableParameterPrompting = False

Client side script:
===================

Dim webBroker
Dim webSource

Set webBroker = CreateObject(&quot;WebReportBroker.WebReportBroker&quot;)
Set webSource = CreateObject(&quot;WebReportSource.WebReportSource&quot;)

webSource.ReportSource = webBroker
webSource.URL = &quot;rptserver.asp&quot;
webSource.PromptOnRefresh = True

CRViewer.ReportName = &quot;TestReport&quot;
CRViewer.ReportSource = webSource
CRViewer.ViewReport 'This line generates the error.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top