Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

X++ passing current selected records in a form for your report

Tags:

report

axapta

x++

I am trying to make this question sound as clear as possible.

Basically, I have created a report, and it now exists as a menuitem button so that the report can run off the form.

What I would like to do, is be able to multi-select records, then when I click on my button to run my report, the current selected records are passed into the dialog form (filter screen) that appears.

I have tried to do this using the same methods as with the SaleLinesEdit form, but had no success.

If anyone could point me in the right direction I would greatly appreciate it.

like image 653
will Avatar asked Apr 04 '12 15:04

will


2 Answers

Take a look at Axaptapedia passing values between forms. This should help you. You will probably have to modify your report to use a form for the dialog rather than using the base dialog methods of the report Here is a good place to start with that!

like image 94
Michael Brown Avatar answered Sep 30 '22 07:09

Michael Brown


Just wanted to add this

You can use the MuliSelectionHelper class to do this very simply:

MultiSelectionHelper selection = MultiSelectionHelper::createFromCaller(_args.caller());
MyTable myTable = selection.getFirst();
while (myTable)
{
    //do something
    myTable = selection.getNext();
} 
like image 36
Clay Miner Avatar answered Sep 30 '22 06:09

Clay Miner