Good morning.
ASP.Net front end, telerik reporting, MS SQL 2008 Database.
I'm trying to pass in multiple pkeys as parameter into a telerik report tableadapter. First, I tried passing them as integers, then I converted the integer keys to a string. One integer works fine, one string item works fine, but when I try to pass in more than one, the report displays a blank page. I tried a system array, blank page. I tried an arraylist, blank page.
I would prefer to pass in the integers (not having to convert them) but at this point, I'll try anything.
First, the code from the app, second, the code from the report:
' run through the XML document passed by the client and post all of the |
' "checked" rows |
inputXML = New XmlDocument |
inputXML.LoadXml(Server.HtmlDecode(DETAILS_XML.Value)) |
rowNodes = inputXML.SelectNodes("ROOT/Receipt") |
postCount = 0 |
confirmedKeys = New StringBuilder("") |
'rKeyStr = CStr(confirmedKeys.ToString) |
For Each rowNode In rowNodes |
If rowNode("Print").InnerText = "Y" Then |
postCount += 1 |
If confirmedKeys.Length > 0 Then |
confirmedKeys.Append(",") |
rKeyStr = rKeyStr & "," |
End If |
confirmedKeys.Append(rowNode("PKey").InnerText) |
rKeyStr = rKeyStr & rowNode("PKey").InnerText |
End If |
' |
Next |
' |
' |
sKey = Session(SESSION_SKEY) |
' |
' |
btnPost.Visible = True |
' |
'********************************************************************************** |
rvReceipt.Report = New SCOReports.Receipt(sKey, rKeyStr) |
rvReceipt.RefreshReport() |
rvReceipt.Visible = True |
'********************************************************************************** |
' REPORT CODE IS NEXT.... |
Public Sub New(ByVal sk, ByVal rKeys) |
InitializeComponent() |
'TODO: This line of code loads data into the 'DatReceipt.datReceiptTable' table. You can move, or remove it, as needed. |
Try |
Me.DatReceiptTableAdapter1.Fill(Me.DatReceipt.datReceiptTable, sk, rKeys) |
Catch ex As System.Exception |
'An error has occurred while filling the data set. Please check the exception for more information. |
System.Diagnostics.Debug.WriteLine(ex.Message) |
End Try |
'TODO: This line of code loads data into the 'DatRecDet1.DatRecDetTable' table. You can move, or remove it, as needed. |
Try |
Me.DatRecDetTableAdapter2.Fill(Me.DatRecDet1.DatRecDetTable) |
Catch ex As System.Exception |
'An error has occurred while filling the data set. Please check the exception for more information. |
System.Diagnostics.Debug.WriteLine(ex.Message) |
End Try |
End Sub |
End Class |
' THE SQL FOR THE TABLE/TABLEADAPTER... |
SELECT RM.PKEY, RM.SKEY, RM.REC_NBR, RM.REC_DATE, RM.REC_CASH, RM.REC_CHECK, RM.REC_CREDIT, RM.AMOUNT, RM.RECEIVEDBY, |
RM.CHKREF, S.LNAME + ', ' + S.FNAME + ' ' + ISNULL(S.MNAME, '') AS STUDNAME, ISNULL(P.FNAME, '') + ' ' + ISNULL(P.LNAME, '') AS PNAME, |
SCH.NAME AS SCH_NAME, D.TAXID, RM.PKSTR |
FROM RECEIPTMASTER AS RM INNER JOIN |
STUDENT AS S ON RM.STUDKEY = S.PKEY LEFT OUTER JOIN |
PARENT AS P ON S.PRI_PGKEY = P.PKEY INNER JOIN |
SCHOOLS AS SCH ON RM.SKEY = SCH.PKEY INNER JOIN |
DISTRICT AS D ON SCH.DISTRICTKEY = D.PKEY |
WHERE (RM.STATUS = 'C') AND (RM.PEND_REC_NBR = 'PRINT') AND (RM.SKEY = @SKEY) AND (RM.PKSTR IN (@Keys)) |
ORDER BY RM.REC_NBR |
Thanks in advance for taking a look.
LEBREW