If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Help on Reporting in ASP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-30-07, 01:18
zyberjock zyberjock is offline
Registered User
 
Join Date: Dec 2003
Location: Manila, Philippines
Posts: 17
Help on Reporting in ASP

I am encountering some error with my code.
Code:
If Not IsObject (Session("oApp")) Then                              
  Set Session("oApp") = Server.CreateObject("CrystalRuntime.Application.9")
End If

Path = Request.ServerVariables("PATH_TRANSLATED")                     

While (Right(Path, 1) <> "\" And Len(Path) <> 0)                      
	iLen = Len(Path) - 1                                                  
	Path = Left(Path, iLen)                                               
Wend                                                                  

If IsObject(Session("oRpt")) Then
	Set Session("oRpt")=Nothing
End If

'--open the report--'
Set Session("oRpt") = Session("oApp").OpenReport(path & m_ReportName, 1)
the error is

Quote:
Microsoft VBScript runtime error '800a01fb'

An exception occurred: 'Session(...).OpenReport'

/reports/report.asp, line 161
and on line 161 is this code

Code:
Set Session("oRpt") = Session("oApp").OpenReport(path & m_ReportName, 1)
I am using ASP, Crystal Report 9 and My Server OS is Advanced Server 2000

I am really clue less on this problem and I really need some experts help.

Thanks.

BTW.. I have many report and only one report is experiencing that error.

Last edited by zyberjock; 06-30-07 at 01:27.
Reply With Quote
  #2 (permalink)  
Old 06-30-07, 02:36
khurram007 khurram007 is offline
Registered User
 
Join Date: Apr 2007
Posts: 29
Before Line 161 copy and paste the following and run the page in browser. Post the results back here then.

Code:
Response.write "<br/>"
Response.write "Seesion-oApp="
Response.write Seesion("oApp")

Response.write "<br/>"
Response.write "path="
Response.write path

Response.write "<br/>"
Response.write "m_ReportName="
 Response.write m_ReportName
Response.write "<br/>"

Response.end
Reply With Quote
  #3 (permalink)  
Old 06-30-07, 02:40
zyberjock zyberjock is offline
Registered User
 
Join Date: Dec 2003
Location: Manila, Philippines
Posts: 17
here is the result

Quote:
Session-oApp =
Response object error 'ASP 0185 : 80020003'

Missing Default Property

/reports/report.asp, line 0

A default property was not found for the object.
Reply With Quote
  #4 (permalink)  
Old 06-30-07, 03:36
khurram007 khurram007 is offline
Registered User
 
Join Date: Apr 2007
Posts: 29
Try to remove Set as following and check now. Postback the results again.

Code:
Session("oApp")=Server.CreateObject("CrystalRuntime.Application.9")
Reply With Quote
  #5 (permalink)  
Old 06-30-07, 03:40
zyberjock zyberjock is offline
Registered User
 
Join Date: Dec 2003
Location: Manila, Philippines
Posts: 17
here is the result when I remove the Set in the code

Quote:
Microsoft VBScript runtime error '800a01fb'

An exception occurred: 'Session(...).OpenReport'

/reports/report.asp, line 174
same Error as before on the same Line
Reply With Quote
  #6 (permalink)  
Old 07-26-07, 19:19
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
Hi there

Similar to what khurram007 was trying.... use this code and post the results.
Please make sure you have Response.Buffer = false at the top of your page.

Code:
If Not IsObject (Session("oApp")) Then                              
  Response.Write("Creating CrystalRunTime<br>")
  Set Session("oApp") = Server.CreateObject("CrystalRuntime.Application.9")
  Response.Write("Created CrystalRunTime and set session<br>")
End If

Path = Request.ServerVariables("PATH_TRANSLATED")                     
Response.Write("Initial Path = ")
Response.Write(Path)
Response.Write("<br>")


While (Right(Path, 1) <> "\" And Len(Path) <> 0)                      
	iLen = Len(Path) - 1                                                  
	Path = Left(Path, iLen)                                               
Wend                                                                  

If IsObject(Session("oRpt")) Then
            Response.Write("Clearing oRpt<br>")
	Set Session("oRpt")=Nothing
            Response.Write("Cleared oRpt<br>")
End If

'--open the report--'
Response.Write("Final Path = ")
Response.Write(Path)
Response.Write("<br>")

Response.Write("ReportName = ")
Response.Write(m_ReportName)
Response.Write("<br>")

Set Session("oRpt") = Session("oApp").OpenReport(path & m_ReportName, 1)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On