OnPostDataItem trigger

Hi there, Is there any reason why the following code in the ‘OnPostDataItem’ trigger on a Card Form shouldn’t work? : // Print all invoices with batchno = vPrintBatchRun after being batchposted. // vPrint = boolean and set before the process starts (value = true) // PrintBatchRun is a field on the Sales Invoice Header Table (code(10). // vPrintBatchRun = Code(10) and a global variable and set during the process. // It has a value. // SalesInvoiceReport is a report variable (report 10074 (Invoice)) IF vPrint THEN BEGIN SalesInvHeader.SETCURRENTKEY(PrintBatchRun,Name); SalesInvHeader.SETRANGE(PrintBatchRun,vPrintBatchRun); SalesInvoiceReport.SETTABLEVIEW(SalesInvHeader); SalesInvoiceReport.RUN; END; //<< Any help is welcome. Thanks, Roelof

Roelof, This trigger only exists in reports, not on forms. Could you be more specific? Regards, Alex

Thanks for the reply, but I figured it out by myself. It suppose to be RUNMODAL. That did the trick. But thanks anyway. Roelof.