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

Printer Settings Dialog

edited April 2009 in Devices
Helo,

I'am using Delphi 7.0 and RB 11.03.

This is what i want :

When I press a button on my form, I wanna see the Printer Settings Dialog.
So I can change tray settings, printer settings, etc

Is there a possibility to do this with RB.

In my app the ShowPrinterDialog := false, Because don't wanna schow the
printerdialog when I print


kr

Bcl

Comments

  • edited April 2009
    Hi Bert,

    See demo 121 in the \Demos\1. Reports\... directory for an example of
    creating your own page setup dialog. Also something like the following may
    be useful to show the existing page setup from code.

    var
    lPageSetupDlg: TppCustomPageSetupDialog;
    lFormClass: TFormClass;
    begin

    lFormClass := ppGetFormClass(TppCustomPageSetupDialog);

    lPageSetupDlg := TppCustomPageSetupDialog(lFormClass.Create(Self));

    try
    lPageSetupDlg.Report := Report;
    lPageSetupDlg.LanguageIndex := Report.LanguageIndex;
    lPageSetupDlg.ShowModal;

    finally
    lPageSetupDlg.Release;
    end;

    end;

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2009
    Tnx, Nico

    Wich use clause do I need ?

    Then I will try your example
  • edited April 2009
    Hi Bert,

    Sorry, after re-reading your initial post, it looks as though I gave you the
    wrong information, the code below will display the page setup dialog, not
    the printer settings dialog.

    To display the printer settings dialog you can simply call the
    Report.PrinterSetup.EditDeviceSettings function.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2009
    Hi Nico,

    Tnx for the usefull help.

    kr

    Bert Clijsters
This discussion has been closed.