Yes, you should be able to do this in a descendent preview class that you can register. There is a new key catcher object in the preview which began in RB 7.01. However, if the focus is in the text search or outline controls, then it doesn't work which appears to be a bug we'll work on. If the focus is on any of the other controls of the preview it should work just fine though. Here is a simple example that uses the F8 key to print the report. The print dialog should appear when F8 is pressed.
Comments
can register. There is a new key catcher object in the preview which began
in RB 7.01. However, if the focus is in the text search or outline controls,
then it doesn't work which appears to be a bug we'll work on. If the focus
is on any of the other controls of the preview it should work just fine
though. Here is a simple example that uses the F8 key to print the report.
The print dialog should appear when F8 is pressed.
unit HotKeyPrintPlugin;
interface
uses
Classes, Windows,
ppPreview;
type
TmyHotKeyPrint = class(TppPreview)
public
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
end;
implementation
{ TmyHotKeyPrint }
procedure TmyHotKeyPrint.KeyDown(var Key: Word; Shift: TShiftState);
begin
inherited KeyDown(Key, Shift);
if (Shift = []) and (Key = VK_F8) then
Print;
end;
initialization
TppPreviewPlugIn.Register(TmyHotKeyPrint);
finalization
TppPreviewPlugIn.UnRegister(TmyHotKeyPrint);
end.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
This bug has been logged but has not been addressed yet in 7.03. Thanks for
your patience.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
We went ahead and researched this bug today and fixed it. This fix will be
available for the next release of ReportBuilder.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com