Response.Expires = -1
Response.AddHeader "Pragma", "no-cache"
Response.AddHeader "cache-control", "no-store"reportname = Server.MapPath(Request("url"))If Not IsObject(session("oApp")) Then                              
Set session("oApp") = Server.CreateObject("CrystalRuntime.Application.9")
session("oApp").LogOnServer "pdssql.dll", "tom", "cyoa", "sa", ""
End IfIf IsObject(session("oRpt")) then
Set session("oRpt") = nothing
End ifSet session("oRpt") = session("oApp").OpenReport(reportname, 1)session("oRpt").MorePrintEngineErrorMessages = False
session("oRpt").EnableParameterPrompting = Falsesession("oRpt").DiscardSavedData
session("oRpt").RecordSelectionFormula = GetDecodeStr(Request("sf"))'Set Value for Parameter Field
strParams = Request("params")
arrParams = split(strParams, ",")
set oParamCollection = Session("oRpt").Parameterfields 
for i =  1 to oParamCollection.Count
if i <= (UBound(arrParams)+1) then
set oParam = oParamCollection.Item(i)
oParam.SetCurrentValue GetDecodeStr(CStr(arrParams(i-1))), 12
end if
nextOn Error Resume Next
session("oRpt").ReadRecords
If Err.Number <> 0 Then
Response.Write err.description
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