function printBeispiel(aAction: string;): boolean; var aReport: TfrmReportData; begin; result := false; aReport:= TfrmReportData.create('Reinigungsliste'); try aReport.setParam('GRID', booltoint(checkGrid.checked)); if aAction = 'Print' then begin result := aReport.printReport2(aPrint); end; finally aReport.free; end; end;
rocedure ButtonPrint_OnClick(Sender: Integer); var begin; if printBeispiel('Print') = true then begin TableName.Next; while not TableST_ID.Eof do begin printBeispiel('Print'); TableName.Next; end; end; end;