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

error using SQL Data on WEB Report

Status
Not open for further replies.

Riyadi

Programmer
Jan 5, 2003
2
ID
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 Crystal report, i used ADO with Connection to SQL
and the feature when i saw in set location are :

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.

do you think , i should have to login first to SQL ? how ?

can anyone help me and show steps to make it work?

thank
riyadi

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top