Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

how to stop preview a report in a loop

edited April 2002 in General
Hi,

I use a loop to preview a list of report like this:

for i:= 1 to 100 do
begin
ProcessMessages;
Report1.Device = 'Screen';
Report1.ModalPreview := true;
Report1.Print;
end;

But I want to the user can stop to preview during the loop. If I set Device
to Printer, I have chance to use a button to break the loop. But I can not
find a chance to stop the loop if I set the device to screen because when I
click the close button in the Preview screen and RB start to preview the
next report again. so how can break the loop?

Thanks

Tao

Comments

  • edited April 2002
    Hi tao,

    I would use e.g. the ESC key as interruptor. Since you have already a
    'ProcessMessages', it will be no problem to read the keyboard.

    regards,
    Chris Ueberall;

This discussion has been closed.