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

passing ADO recordset to Crystal Reports in ASP

Status
Not open for further replies.

dokken

Programmer
Mar 7, 2001
61
US
I have a SQL server 2000 database. I understand that I cannot use NT authentication to connect to a database in CR. I thought I could open a recordset and set the report database to the recordset. Has anybody done this?

Thanks,
Paul
 
Try something like this


Set RS = MyConn.Execute("Select * From XYZ")


reportname = "Report1.rpt"

If Not IsObject (session("oApp")) Then

Set session("oApp") = Server.CreateObject("Crystal.CRPE.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)


set Database = session(&quot;oRpt&quot;).Database

set Table = Database.Tables.Item(1)
Table.SetPrivateData 3, Rs


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top