Selection of records in a grid before exporting

I want to export records (xls, pdf etc) in a grid but only those which are selected.
The way to go could be to create a button with “run”.
In run-time You can select the records all in ones and deselect those you donot want to have in the export.
In principle I only want to press the “export-button” after the selection and the process should start.
But how to code this?

Regards Bert Steinebach

It will require a lot of fiddling I’m affraid, but I would start by copying the selected records into a temporary table and use this one for the pdf report.

Yes, that’s the way to go. I make a tempory table, do the selecting in a form with a selectfield and update the tempory table.
Than I can do the export with a grid. In this case I can also make a join between the adresses-table and persons-table.
I will extend this with two tempory fields: salutation1 and salutation2 made on bases of the sex so that it is complete ready for merge in letters and mails

Thanks…