procedure tform.buttonclick(sender:tobject);
var
f : boolean;//f=false时,quickrep1打印
sr : tmodalresult;
begin
quickrep1.Print;
f := false;
repeat
if checkbox1.Checked then
begin
form2.ShowModal;
if form2.ModalResult = mrno then
quickrep1.Print
else
begin
f := true;
if form2.ModalResult = mrok then
;
//标记;
end;
end
else
begin
sr := messagedlg('打印正确吗?', mtConfirmation, [mbyes, mbno, mbcancel], 0);
if sr = mrno then
quickrep1.Print
else
begin
f := true;
if sr = mrok then
//标记;
end;
end;
until f
end;
//checkbox1.caption := '用窗体。';