<%@language = vbscript%>
<%
Set oApp = CreateObject("CrystalRuntime.Application")
reportname = "certPF.rpt"
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("options") = Session("oApp").options
'Session("options").MatchLogonInfo = 1
Set session("oRpt") = session("oApp").OpenReport(path & reportname, 1)
Set session("oPageEngine") = session("oRpt").PageEngine
set crtable = session("oRpt").Database.Tables.Item(1)
crtable.SetLogonInfo "PF","PF", "test", "test"
response.write "Connect " & crtable.testconnectivity & "<br />"
'set session("oRptOptions") = Session("oRpt").Options
'session("oRptOptions").MorePrintEngineErrorMessages = 0
On Error Resume Next
session("oRpt").ReadRecords
If Err.Number <> 0 Then
Response.Write "An Error has occured on the server in attempting to access the data source"
Else
If IsObject(session("oPageEngine")) Then
set session("oPageEngine") = nothing
End If
set session("oPageEngine") = session("oRpt").PageEngine
End If
%>