Doug.C
(Doug Crabtree)
December 3, 2020, 7:01pm
1
I would like to add in the ability to print the RNI report with a filter. I can customize the print form, but how do you use the data provided (in this case VendorNum) to control the report output? It could be a single or multiple VendorNums.
Thanks!
1 Like
ckrusen
(Calvin Krusen)
December 3, 2020, 7:36pm
2
See the following:
Try the following:
Customize the Credit Card Report form, adding a date control. Bind it to CallContextBPMData.Date01
Nothing need to be done in the RDD
In the copy of your CC Report RDL, edit the Query expression for dataset CreditTran. Add the highlighted parts below:
[image]
The RDD will use the native date from the form to limit the lower (oldest date), and the additions to the Query expression limit the upper end date.
I haven’t tried the above - as we don’t process credit cards. …
For multiple values, either add multiple fields on the form, and to the RLD query (Using logic to AND /OR them, while ignoring blanks).
Or make it a text field that you enter as a comma separated list. and use the the SQL IN
operator. This requires you enter the list very specifically.
" WHERE T2.CustID IN (" + T2.Character01 + ") "
And the format of the text field would need to be like:
'ACME123','WID-234'
Doug.C
(Doug Crabtree)
December 4, 2020, 7:49pm
3
The multiple values was what was getting me. I don’t know why, but the IN
didn’t even occur to me.
Thanks!
Final screens:
***EDIT***
I had to change up the SQL a bit…
SELECT ...
FROM T1, T2
WHERE CASE WHEN T2.Character01 = '' THEN 1 ELSE CASE WHEN T2.Character01 LIKE '%,'+T1.VendorID+',%' THEN 1 ELSE 0 END END = 1
When I built the Character01
, I used
strSelectionList = ",";
foreach (DataRowView dr in intVendorView_DataView)
{
strSelectionList = string.Format("{0}{1},",strSelectionList, dr.Row["VendorID"]);
}
This allows for the full report when no vendors are selected.
1 Like
ckrusen
(Calvin Krusen)
December 5, 2020, 9:16pm
4
NIce … I didn’t realize you were trying to get the parameter from the Filter grid. That obviously took a little more work than just passing a parameter from a single text box.
Doug.C
(Doug Crabtree)
December 6, 2020, 1:32pm
5
It started out that way, then it kind of snowballed once it was known that it was possible. Making it work like a regular filter keeps the cheese where everybody expects it
1 Like