I'm attempting to modify a previously created SSRS report to allow selecting multiple sales orders and process the data for each sales order. I'm using the RDP/Controller/Contract pattern for this. It's successful when selecting a single sales order, but for some reason, getting the list of selected values is always showing as a null object in my RDP Class.
1. In my controller class below, I can see the salesIds list parameter contains the list of orders I selected. First parameter, salesId, is the original parameter that works today. I'm just setting it to the last selected salesId for now. It's not in the screenshot, but I use the MultiSelectionHelper class to iterate through the selected salesids and add them to the recordSet list variable.
2. In my RDP class, the salesIds parameter comes across as null. SalesId parameter retains it's value though.
Below is my code for my data contract. Am I doing something wrong in terms of the list parameter? I have refreshed the dataset in the report itself as well, so the parameter does show in the report.
[DataContractAttribute] public class cdiSalesConfirmContract { SalesId salesId; List salesIds; [ DataMemberAttribute('SalesId') ] public SalesID paramsalesid(SalesId _salesid = salesid) { salesId = _salesid; return salesid; } [ DataMemberAttribute('SalesIds'), AifCollectionTypeAttribute("SalesIds",Types::String) ] public List parmSalesIds(List _salesIds = salesIds) { salesIds = _salesIds; return salesIds; } }
As Crispin said you can try a container instead of a List to check if it works.
But if it doesn't, you may convert the sales id list into a comma separated string, then on the DP you can convert it into a container using str2con().
Instead of list, try using a container. (I'm not sure of this, though)
But the best option is to make/use a contract query, and set it's range with all the salesIds in the controller.prePromptModifyContract().
In your DP class, try to manage the remaining functions with an outer loop on this query.
Was never able to find a solution to this. Oh well.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156