Hi,
We are developing an ASP/CrystalReport/Oracle application and are in need of some URGENT help on CR 8.5 Developer edition. We are using the same technique mentioned in the sample files provided along with the Crystal reports i.e. AlwaysRequiredSteps.asp and MoreRequiredSteps.asp
We have 3 NT Servers - Development, System Test and Production. We have installed CR 8.5 (Developer Edition) on all the servers. The web application works fine and displays the report correctly only on Development
and Test Servers. However on production server the same code failed at call to ReadRecords method (see the code segment segment below).
<%
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)
Wend
Path = Path & "reports\"
If IsObject(session("oRpt") then
Set session("oRpt" = nothing
End if
On error resume next
Set session("oRpt" = session("oApp".OpenReport(path & reportname, 1)
If Err.Number <> 0 Then
Response.Write "Error Occurred creating Report Object: " & Err.Description
Set Session("oRpt" = nothing
Set Session("oApp" = nothing
Session.Abandon
Response.End
End If
For n = 1 to Session("oRpt".Database.Tables.Count
Session("oRpt".Database.Tables.Item.SetLogonInfo CStr("rtem" CStr("" CStr("rtm_user" CStr("rtmproj"
Next n
'==========================================================
' Retrieve the Records and Create the "Page on Demand"
' Engine Object
'==========================================================
On Error Resume Next
session("oRpt".ReadRecords
If Err.Number <> 0 Then
Response.Write "Error Numer: " & Err.Number
Response.Write "Error Description: " & Err.Description
Response.Write "Error Source: " & Err.Source
Set Session("oRpt" = nothing
Set Session("oApp" = nothing
Session.Abandon
Response.End
Else
If IsObject(session("oPageEngine") Then
set session("oPageEngine" = nothing
End If
set session("oPageEngine" = session("oRpt".PageEngine
End If
%>
The error details are:
Err.Number : -2147191274
Err.Source : Crystal Reports ActiveX Designer
Err.Description: <nothing>
I searched the Internet on the Err.Number = -2147191274 and apparently the number indicates that some thing is wrong with a formula in the report. This is incorrect because we tried out a simplest report that just has a static text field in it and we get the error at ReadRecords only that the Err.Number is -2147191245 now.
Also the same reports work just fine on the production server when run from Crystal Designer GUI or from a VB application. It does not work from the ASP page.
We think there is no problem with the database Alias resolution, since we successfully access the same Oracle database from other ASP only (no Crystal Reports) pages.
Could there be any issue with the security/access problems to execute the Report.ReadRecords method from the user ID under which ASP executes. We have a fixed NT user ID for Anonymous Access to IIS (and hence ASP).
Please help.
Thanks,
Mahesh
We are developing an ASP/CrystalReport/Oracle application and are in need of some URGENT help on CR 8.5 Developer edition. We are using the same technique mentioned in the sample files provided along with the Crystal reports i.e. AlwaysRequiredSteps.asp and MoreRequiredSteps.asp
We have 3 NT Servers - Development, System Test and Production. We have installed CR 8.5 (Developer Edition) on all the servers. The web application works fine and displays the report correctly only on Development
and Test Servers. However on production server the same code failed at call to ReadRecords method (see the code segment segment below).
<%
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)
Wend
Path = Path & "reports\"
If IsObject(session("oRpt") then
Set session("oRpt" = nothing
End if
On error resume next
Set session("oRpt" = session("oApp".OpenReport(path & reportname, 1)
If Err.Number <> 0 Then
Response.Write "Error Occurred creating Report Object: " & Err.Description
Set Session("oRpt" = nothing
Set Session("oApp" = nothing
Session.Abandon
Response.End
End If
For n = 1 to Session("oRpt".Database.Tables.Count
Session("oRpt".Database.Tables.Item.SetLogonInfo CStr("rtem" CStr("" CStr("rtm_user" CStr("rtmproj"
Next n
'==========================================================
' Retrieve the Records and Create the "Page on Demand"
' Engine Object
'==========================================================
On Error Resume Next
session("oRpt".ReadRecords
If Err.Number <> 0 Then
Response.Write "Error Numer: " & Err.Number
Response.Write "Error Description: " & Err.Description
Response.Write "Error Source: " & Err.Source
Set Session("oRpt" = nothing
Set Session("oApp" = nothing
Session.Abandon
Response.End
Else
If IsObject(session("oPageEngine") Then
set session("oPageEngine" = nothing
End If
set session("oPageEngine" = session("oRpt".PageEngine
End If
%>
The error details are:
Err.Number : -2147191274
Err.Source : Crystal Reports ActiveX Designer
Err.Description: <nothing>
I searched the Internet on the Err.Number = -2147191274 and apparently the number indicates that some thing is wrong with a formula in the report. This is incorrect because we tried out a simplest report that just has a static text field in it and we get the error at ReadRecords only that the Err.Number is -2147191245 now.
Also the same reports work just fine on the production server when run from Crystal Designer GUI or from a VB application. It does not work from the ASP page.
We think there is no problem with the database Alias resolution, since we successfully access the same Oracle database from other ASP only (no Crystal Reports) pages.
Could there be any issue with the security/access problems to execute the Report.ReadRecords method from the user ID under which ASP executes. We have a fixed NT user ID for Anonymous Access to IIS (and hence ASP).
Please help.
Thanks,
Mahesh