Hi - maybe you can print out the values from the dictionary to make sure the names are correct.
Maybe CommissionStatement does not exist in the dictionary?
<%
dim rpt
Rpt=request.QueryString("Report")
' ALways requires steps......
' CREATE THE APPLICATION OBJECT
If Not IsObject (session("oApp")) Then
Set session("oApp") = Server.CreateObject("CrystalRuntime.Application.11")
End If
' CREATE THE REPORT OBJECT
Path = Request.ServerVariables("PATH_TRANSLATED")
While (Right(Path, 1) <> "\" And Len(Path) <> 0)
iLen = Len(Path) - 1
Path = Left(Path, iLen)
Wend
'OPEN THE REPORT (but destroy any previous one first)
If IsObject(session("oRpt")) then
Set session("oRpt") = nothing
End if
On error resume next
Set session("oRpt") = session("oApp").OpenReport(path & Rpt, 1)
'This line uses the "PATH" and "reportname" variables to reference the Crystal
'Report file, and open it up for processing.
If Err.Number <> 0 Then
Response.Write "Error Occurred creating Report Object: " & Err.Description
Set Session("oRpt") = nothing
Set Session("oApp") = nothing
Session.Abandon
Response.End
End If
session("oRpt").MorePrintEngineErrorMessages = False
session("oRpt").EnableParameterPrompting = False
dim sStr
sStr = request.QueryString
dim aParams : aParams = split(sStr, "&")
dim aKeyValue, i, sIDX
dim iIntMax : iIntMax = 0
dim sparam, Keys, Items
dim dList : set dList = Server.CreateObject("Scripting.Dictionary")
'/// Collect the Values wanted into the dictionary object
for i= lbound(aParams) to ubound(aParams)
aKeyValue = split(aParams(i),"=")
sIDX = aKeyValue(lbound(aKeyValue))
sParam = aKeyValue(ubound(aKeyValue))
dList.add sIDX, sParam
next
dList.Remove("Report")
'Get dictionary Keys
Keys = Dlist.Keys
'Get dictionary Items
Items = DList.Items
'Loop through Keys array
For iCount = 0 To UBound(Keys)
param=Keys(iCount)
crystalparam=Items(iCount)
Session("oRpt").ParameterFields.GetItemByName(param).AddCurrentValue(crystalparam)
Next
'/// Clean up
set dList = nothing
'Create a reference to the tables collection of the main report
Set mainReportTableCollection = Session("oRpt").Database.Tables
For Each mnTable in mainReportTableCollection
With mnTable.ConnectionProperties
.Item("user ID") = "SQLAdmin"
.Item("Password") = "xxxx"
.Item("DSN") = "Reports"
.Item("Database") ="Reports"
End With
Next
session("oRpt").ReadRecords
If Err.Number <> 0 Then
Response.Write "Error Occurred Reading Records: " & Err.Description
Set Session("oRpt") = nothing
Set Session("oApp") = nothing
Session.Abandon
Response.End
Else
If IsObject(session("oPageEngine")) Then
set session("oPageEngine") = nothing
End If
set session("oPageEngine") = session("oRpt").PageEngine
End If
%>
<!-- #include file="SmartViewerActiveX.asp" -->