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

Hotkey to print Report in preview mode?

edited March 2003 in General
Hi,

Just asking, can I define a hot key to print a report in preview mode?

Regards
Tan Kun Wei

Comments

  • edited March 2003
    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.

    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


  • edited October 2003
    "Jim Bennett \(Digital Metaphors\)"
  • edited October 2003
    Hi Steve,

    This bug has been logged but has not been addressed yet in 7.03. Thanks for
    your patience.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2003
    "Nico Cizik \(Digital Metaphors\)" wrote
  • edited November 2003
    Hi Steve,

    We went ahead and researched this bug today and fixed it. This fix will be
    available for the next release of ReportBuilder.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2003
    "Nico Cizik \(Digital Metaphors\)" wrote
This discussion has been closed.