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) <> "\" And Len(Path) <> 0)
iLen = Len(Path) - 1
Path = Left(Path,iLen) Wend If IsObject(session("oRpt") then
Set session("oRpt" = nothing
End if
Set session("oRpt" = session("oApp".OpenReport(path & reportname, 1)
session("oRpt".DiscardSavedData
set Database = session("oRpt".Database
set Tables = Database.Tables
set Table1 = Tables.Item(1)
Table1.SetPrivateData 3, session("oRs"
On Error Resume Next
session("oRpt".ReadRecords
in Crystal report, i used ADO with Connection to SQL
and the feature when i saw in set location are :
in "set alias" 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
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) <> "\" And Len(Path) <> 0)
iLen = Len(Path) - 1
Path = Left(Path,iLen) Wend If IsObject(session("oRpt") then
Set session("oRpt" = nothing
End if
Set session("oRpt" = session("oApp".OpenReport(path & reportname, 1)
session("oRpt".DiscardSavedData
set Database = session("oRpt".Database
set Tables = Database.Tables
set Table1 = Tables.Item(1)
Table1.SetPrivateData 3, session("oRs"
On Error Resume Next
session("oRpt".ReadRecords
in Crystal report, i used ADO with Connection to SQL
and the feature when i saw in set location are :
in "set alias" 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