Error: "User session has expired"

Posted on 2003-03-27
Medium Priority
Last Modified: 2007-12-19
I am trying to use an RPT trough an ASP page, but I getting "User session has expired". I am using a OLE DB to connect to SQL Server.
This is my code:

<!-- #include file="SmartViewerActiveX.asp" -->

Set cnn = Server.CreateObject("ADODB.Connection")
cnn.open "PROVIDER=SQLOLEDB;DATA SOURCE=Name of the server;UID=sa;PWD=123;DATABASE=Name Database "

reportname = "prueba.rpt"
If Not IsObject (session("oApp")) Then                              
Set session("oApp") = Server.CreateObject("CrystalRuntime.Application")
End If                                                                

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

If IsObject(session("oRpt")) then
     Set session("oRpt") = nothing
End if                                                    

Set session("oRpt") = session("oApp").OpenReport(path & reportname, 1)

session("oRpt").MorePrintEngineErrorMessages = False
session("oRpt").EnableParameterPrompting = False

set session("ParamCollection") = Session("oRpt").Parameterfields

set Dep = session("ParamCollection").Item(1)

Call Dep.AddCurrentValue (CInt(request("DepEnvia")))

On Error Resume Next                                                  
If Err.Number <> 0 Then                                              
 Response.Write "An Error has occured on the server in attempting to access the data source" & Err.Number

  If IsObject(session("oPageEngine")) Then                              
       set session("oPageEngine") = nothing
  End If
set session("oPageEngine") = session("oRpt").PageEngine
End If                                                                
Question by:juliomexico
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2

Author Comment

ID: 8219666
thanks for your help

Author Comment

ID: 8226681
now the error is


Thank's mlmcc
LVL 101

Accepted Solution

mlmcc earned 300 total points
ID: 8228896

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question