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

ASP/CR 8.5 - Report.ReadRecords Error - Help Please !!

Status
Not open for further replies.

hegdemk

Programmer
Oct 29, 1999
5
US
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(&quot;oApp&quot;)) Then
Set session(&quot;oApp&quot;) = Server.CreateObject(&quot;CrystalRuntime.Application&quot;)
End If

Path = Request.ServerVariables(&quot;PATH_TRANSLATED&quot;)
While (Right(Path, 1) <> &quot;\&quot; And Len(Path) <> 0)
iLen = Len(Path) - 1
Path = Left(Path, iLen)
Wend
Path = Path & &quot;reports\&quot;

If IsObject(session(&quot;oRpt&quot;)) then
Set session(&quot;oRpt&quot;) = nothing
End if

On error resume next

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

If Err.Number <> 0 Then
Response.Write &quot;Error Occurred creating Report Object: &quot; & Err.Description
Set Session(&quot;oRpt&quot;) = nothing
Set Session(&quot;oApp&quot;) = nothing
Session.Abandon
Response.End
End If

For n = 1 to Session(&quot;oRpt&quot;).Database.Tables.Count
Session(&quot;oRpt&quot;).Database.Tables.Item(n).SetLogonInfo CStr(&quot;rtem&quot;) CStr(&quot;&quot;) CStr(&quot;rtm_user&quot;) CStr(&quot;rtmproj&quot;)

Next n

'==========================================================
' Retrieve the Records and Create the &quot;Page on Demand&quot;
' Engine Object
'==========================================================
On Error Resume Next

session(&quot;oRpt&quot;).ReadRecords

If Err.Number <> 0 Then
Response.Write &quot;Error Numer: &quot; & Err.Number
Response.Write &quot;Error Description: &quot; & Err.Description
Response.Write &quot;Error Source: &quot; & Err.Source
Set Session(&quot;oRpt&quot;) = nothing
Set Session(&quot;oApp&quot;) = nothing
Session.Abandon
Response.End
Else
If IsObject(session(&quot;oPageEngine&quot;)) Then
set session(&quot;oPageEngine&quot;) = nothing
End If
set session(&quot;oPageEngine&quot;) = session(&quot;oRpt&quot;).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
 
Hi,

While comparing the Oracle client side trace file from the Development and Production servers we found that the Oracle connection from Production server is not going through. The differences are

1. Development Server (on which CR works)
The program that tries to connect to Oracle is MTX.EXE
The connection succeeds

2. Production Server (on which the CR fails)
The program that tries to connect to Oracle is INETINFO.EXE
The connection fails with the message:
-<ERROR>- LoadLibrary on ntusnt returned error(126)
-<ERROR>- nsres: id=0, op=77, ns=12538, ns2=12560; nt[0]=508, nt[1]=0, nt[2]=0
Call failed...

I searched the Internet about 'ntusnt' and it seems to be an Oracle networking DLL. When does ntusnt returns the error code 126, does anybody know?

Thanks,
Mahesh
 
Hey HegdeMK,
Did you every get a soln to your issue? I am facing the same problem. Please let me know
Thanks
Pranav
 
oops...my bad...
dont know why i did not post the soln ..
anyways its been a long time ...but here's what I can recollect :
I had the DatabaseServer.dbo.TableName as my location to each table. I just had to delete the DatabaseServer.dbo from each table's location since i needed that to be dynamic. Another problem i faced was permissions issue regarding the rights to the rpt file. the default user is the IWAM_MachineName. This user needs to have rights to the rpt files.
Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top