Standby Form
Does anybody know how to show a standby form while a report is processing?
I usually have a Print Button, and after it is clicked the first time, the
system pauses for about 3 or 4 seconds before the preview window is shown.
It would be nice either to have a blank form immediately show up, or to have
a form shown that simply says, "Standby..." or "Report generation in
progress." Any suggestions?
David Miller
I usually have a Print Button, and after it is clicked the first time, the
system pauses for about 3 or 4 seconds before the preview window is shown.
It would be nice either to have a blank form immediately show up, or to have
a form shown that simply says, "Standby..." or "Report generation in
progress." Any suggestions?
David Miller
This discussion has been closed.
Comments
execution will continue in the report generation process. You could use an
autocreated form in your project. Before you call Report.Print, you can set
the visibliity of the form to true, and set it to false once the page is
received by the screen device:
procedure TForm1.Button1Click(Sender: TObject);
begin
Form2.Visible := True;
ppReport1.Print;
end;
procedure TForm1.ppReport1BeforePrint(Sender: TObject);
var
lScreenDevice: TppScreenDevice;
begin
lScreenDevice := TppViewer(ppReport1.PreviewForm.Viewer).ScreenDevice;
lScreenDevice.OnPageReceive := OnScreenDevicePageReceive;
end;
procedure TForm1.OnScreenDevicePageReceive(Sender: TObject; aPage: TObject);
begin
Form2.Visible := False;
end;
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com