Our receiving team in the warehouse wants to print a simple part label when they are receiving items. I would like to add a button on the form Accounts Payable > Common > Purchase Orders > All Purchase Orders in the Generate group of the Receive Tab. When pressed, this button would print out a simple label report, printing one label for every line item on the selected purchase order in the form grid. I don't know how to pass the active grid selection of the form as a filter for the report. Simple examples would be greatly appreciated!
Firstly, you can gather the records selected in the grid by using MultiSelectionHelper class. You can find an example of it in the SalesCancelOrderDropDialog form (closeOk method).
Then, you will pass the selected records to a report. One way is to pass the selected recId's as a comma separated string to the RDP class and do the filtering there.
Simple code for passing a record as an arg to a report. Same as passing a record to a form
Args args = new Args();
rr = classFactory.reportRunClass(args);