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

Calling Crystal Report from ASP

Status
Not open for further replies.

conjurer111

Programmer
Aug 11, 2002
76
IN
Hi,

I'm trying to display a report and get the following error -

CPEAUT Error occured on Server 20614: Starting background processing failed

My HTML page calls the ASP page and passes the required report name and other parameters which in turn calls the rptserver.asp page. What could be going wrong. I have the ASP page and the rptserver.asp page in the same folder.

Thanks.
 
I'm using Crystal Report in ASP
i have make syntax same with crystal sample report.
in Crystal Report I used ADO to SQL SERVER and in ASP
I changed recordset with new Query SQL in ASP but the same Structure field in Crystal,
the syntax like this

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

Path = Request.ServerVariables("PATH_TRANSLATED")
While (Right(Path, 1) <> &quot;\&quot; And Len(Path) <> 0)
iLen = Len(Path) - 1
Path = Left(Path,iLen) Wend If IsObject(session(&quot;oRpt&quot;)) then
Set session(&quot;oRpt&quot;) = nothing
End if

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

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

set Database = session(&quot;oRpt&quot;).Database
set Tables = Database.Tables
set Table1 = Tables.Item(1)
Table1.SetPrivateData 3, session(&quot;oRs&quot;)

On Error Resume Next
session(&quot;oRpt&quot;).ReadRecords

in &quot;set alias&quot; the parameters are
Table : ado
Server Type : Active Data (ADO)
Server name : Developer
Database :
User id : sa

the error description is :
-2147192185 - Error Occurred Reading Records: SQL
server error.

can anybody help me ?

thank
riyadi
 
Hi here the code i use
<%@ Language=VBScript %>

<% Response.Buffer=True %>

<%

reportname= &quot;Name of your report.rpt&quot;





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

If IsObject(session(&quot;oRpt&quot;)) Then

set session(&quot;oRpt&quot;) = nothing

End If



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

'session(&quot;oRpt&quot;).DiscardSavedData



session(&quot;oRpt&quot;).MorePrintEngineErrorMessages = False

session(&quot;oRpt&quot;).EnableParameterPrompting = False



userid= &quot;your id&quot;
password= &quot;your password&quot;
dns=&quot;your DNS&quot;
db=&quot;your database&quot;
'set create table for as many table usein your report
'if you have 2 tables you have to cut and paste the
'and change the item() to 2 item(2)

set crtable = session(&quot;oRpt&quot;).Database.Tables.Item(1)

crtable.SetLogonInfo cstr(dns), cstr(db), cstr(userid), cstr(password)

if not crtable.TestConnectivity then

response.write &quot;ReCrystallize Warning: Unable to connect to data source using the following information.<BR><BR>&quot;

response.write &quot;Server / ODBC data source: &quot;& dns&&quot;<BR>&quot;

response.write &quot;Database / Table:&quot;& db &&quot; <BR>&quot;

response.write &quot;User Name: &quot; & userid & &quot;<BR>&quot;

response.write &quot;Password: &quot; & password & &quot;<BR><BR><BR>&quot;

end if
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top