Generating a PDF-report with run button

I want to generate a PDF with the PDF-report apllication which consist of one PDF with several pages in combination with the run button in a grid. For every ticket record one page.but one PDF.
To get this I need to generate one WHERE clause for the PDF report and then it generates one multipage PDF.
But how to do that with the run button. After selecting several record it generates pro record a global which I can use in the redir to the PDFreport.
So in the “on record” of the run button I wrote at the end something like …sc_redir("<name of the PDF-report"), “parm1 = [<name of the global>],”_self"…
This works when you select one record with the run button. But when I select more records with the run button then it does not work.
The firing of the the sc_redir should wait till the end of of all the selected records. How to do that?

Can anybody please give me a solution for that…

Kind regards, Bert

How could I overlook the tab in the run button “on finish” …problem solved.

that is good, thanks Bert, i just want to hint out something about sc_redir, i found it tricky, it redirects without committing any sql before, hence i used to do sc_sql_commit() before any sc_redir… just if you use later, cheers