Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2003
    Location
    Manila, Philippines
    Posts
    17

    Unanswered: 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

    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 02:27.

  2. #2
    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

  3. #3
    Join Date
    Dec 2003
    Location
    Manila, Philippines
    Posts
    17
    here is the result

    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.

  4. #4
    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")

  5. #5
    Join Date
    Dec 2003
    Location
    Manila, Philippines
    Posts
    17
    here is the result when I remove the Set in the code

    Microsoft VBScript runtime error '800a01fb'

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

    /reports/report.asp, line 174
    same Error as before on the same Line

  6. #6
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    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)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •