Stoping a report in progress
I want to enable the user to stop a report as it's being generated if they
selected the wrong report or whatnot. I've got a drop-down box that lists
the available reports and in the OnChange event I added the following code:
if MyReport.Printing then
begin
ppViewer1.Cancel;
MyReport.PageLimitReached;
MyReport.ResetDevices;
end;
while MyReport.Printing do {show some "Waiting" message}
The last WHILE statement just keeps looping; the report.Printing never
results in a false value. What is the proper aproach to stoping the print
preview in progress so that I can load the next report and pop it onto the
previewer instead?
Gregg Van Oss
gregg@epicsoftware.net
selected the wrong report or whatnot. I've got a drop-down box that lists
the available reports and in the OnChange event I added the following code:
if MyReport.Printing then
begin
ppViewer1.Cancel;
MyReport.PageLimitReached;
MyReport.ResetDevices;
end;
while MyReport.Printing do {show some "Waiting" message}
The last WHILE statement just keeps looping; the report.Printing never
results in a false value. What is the proper aproach to stoping the print
preview in progress so that I can load the next report and pop it onto the
previewer instead?
Gregg Van Oss
gregg@epicsoftware.net
This discussion has been closed.
Comments
- can you create a simple example and email to support@digital-metpahors.com
in zip format. That way we can see exactly what you are doing. I cannot
determine whether you are using the preview form or a non-modal viewer on a
form, or how you are showing a Waiting message (I assume it is not a modal
dialog).
- RB 10.05 contains some mods to facilitate cancelling reports. Are you
using RB 10.05 (check the Help | About box of the report designer).
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com