FASTREPORT 重复打印问题(100)

F

fuyou

Unregistered / Unconfirmed
GUEST, unregistred user!
大概情形:1、主窗体显示明细表;2、主窗体处有一按钮打开查询窗口,查询结果可多选;多选后的记录可进行列队打印(打完一个接着打另一个;(预览时必须关掉一个才会弹出下一个报表)问题:每一个打印都会根据主窗体明细中的记录条数显示相应份数的同一个报表,例如:如果主窗体有两条明细记录,则每一个打印任务都会列出两份相同的报表,其实我只要一份就行了,为啥会这样????
 
F

fuyou

Unregistered / Unconfirmed
GUEST, unregistred user!
补充: DELPHI 7.0 FASTREPORT 4.0
 
F

fuyou

Unregistered / Unconfirmed
GUEST, unregistred user!
补充:预览时能看见主窗体中明细表的记录指针从上到下移动,一条记录一个COPY
 
F

fuyou

Unregistered / Unconfirmed
GUEST, unregistred user!
补充:程序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;
 
Top