补充:程序procedure TfrmFindClaimReport.printreport(TTLAMOUNT,TTLAMOUNT_B:REAL);
begin
frxRpt.LoadFromFile( ExtractFilePath( Application.ExeName ) + 'FRF/CLAIMREPORT_B.fr3',false ) case rzrgprintmodel.ItemIndex of 1 : frxRpt.ShowReport;
0 : frxRpt.Print;
end;
end;
procedure TfrmFindClaimReport.advtlbrbtnPRINTClick(Sender: TObject);VAR I:BYTE;
strClaimNo:STRING;
ClaimNoList:TStrings;
INTH,INTI,INTW,intTOP,QTYTTL:Integer;
TTLOtherAmount,rlDisc,rlAmount,rlAmount_B,rlFlightCost,TTLAmount,TTLAmount_B:real;
begin
if wwdbgrdMain.SelectedList.Count>=1 then
begin
FOR I := 0 TO wwdbgrdMain.SelectedList.Count - 1do
begin
wwdbgrdMain.DataSource.DataSet.GotoBookmark(wwdbgrdMain.SelectedList.Items);
// WWDBGRDMAIN与主表关联 wwdbgrdMain.DataSource.DataSet.FREEBOOKMARK(wwdbgrdMain.SelectedList.Items);
strClaimNo := wwdbgrdMain.DataSource.DataSet.FIELDBYNAME('CLAIMNO').AsString ;
with myqry_Subdo
begin
if active then
active := false;
parambyname('pClaimNo').AsString := strClaimNo;
open;
end;
printreport(TTLAmount,TTLAmount_B);
end;
wwdbgrdMain.SelectedList.Clear;
end;
end;