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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nasty CR objects and ASP

Status
Not open for further replies.

Neil111

Programmer
Oct 16, 2002
7
0
0
GB
If Not IsObject(session("oApp")) Then
Set session("oApp") = Server.CreateObject("CrystalRuntime.Application")
End If

If isObject(session("oRpt")) then
set session("oRpt") = nothing
End If

set session("oRpt") = session("oApp").OpenReport(reportname, 1)

Now, I'm using Crystal Reports 8.5 (Developer Edition) and Crystal Enterprise 8.0
The problem I'm having is when the ASP executes the last line (the one with the .openReport method) I get the error:

Object required: 'Session(...)'

I've discovered that the reason for this (or I think), is that the .OpenReport method is in fact a sub. So It doesn't return an object and therefore can't set the session variable.

I can't find any useful code online to help me out. All the code and explanations use this as an example.

Any help would be greatly appreciated.

Neil.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top