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

Block Print in Preview mode, how?

edited July 2007 in General
Can I block print command when the user in Preview Mode? How I do These?

or...

When I in Preview mode, can I now when the user print the report?

thanks for All
Fellipe H.

Comments

  • edited July 2007
    Hi Fellipe,

    I'm a bit unclear about what you would like to accomplish. Are you looking
    to print a selection of text from the preview? If so, note that the preview
    window does not have this type of user interaction available (highlighting
    text). One option might be to export the desired text to a text file and
    print that behind the scenes.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2007
    Hello Nico,

    I want to disable print in Preview mode... I would like my users only view
    report, doen't print it.

    Regards,
    Fellipe H.



  • edited July 2007
    Hi Fellipe,

    Thanks for the clarification.

    You can use the TppPrintPreview.PrintButton property to access the print
    button of the preview window. Something like following from the
    OnPreviewFormCreate event...

    uses
    ppPrvDlg;

    ...

    TppPrintPreview(ppReport1.PreviewForm).PrintButton.Visible := False;

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2007
    Thanks for your quickly reply...

    But.. I put these code, and I add the uses unit:

    with RelBasic do
    begin
    (..)
    RepBasic.BeforePrint := OnBeforePrint;
    TppPrintPreview(RepBasic.PreviewForm).PrintButton.Visible := False;
    RepBasic.Print;
    end;

    But, error appears, AccessViolation on TppPrintPreview.GetPreview.

    I do something wrong?

    Thanks
    Fellipe H.

  • edited July 2007
    Sorry, I found the error... my mistake...

    Fellipe H.

This discussion has been closed.