Multi-value lookup
All the report dialog controls that we have seen so far in this book only store a single value. But there can be cases where you want the users to be able to choose multiple values. This recipe is going to show you how to do it.
Getting ready
This recipe will extend the PKtInventBatchReport built in Chapter 4, Report Programming Model – RDP.
How to do it…
This recipe will add a multi-value lookup for the batch ID so that the user can select multiple batches to be printed in the report:
The first step is to create a parm method in the contract of type list. The parm method should appear as seen here:
[ DataMemberAttribute('MultipleBatch'), SysOperationLabelAttribute("Multiple Batch"), AifCollectionTypeAttribute('return', Types::String) ] public List parmMultiBatch(List _multiBatch = multiBatch) { multiBatch = _multiBatch; return multiBatch; }
Once the parm method is added, the dialog shows a report with a list control, but the lookup has no values in it. To...