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

How to I set Print To File checkbox

edited February 2004 in General
(Hope this is an easy one)
How do I set Print To File?



If I set ppReport.PrintDialog.PrintToFile := True;

Before the print dialog is displayed, the checkbox (Print to File), remains
unchecked when I go to the print dialog.



Joe

Comments

  • edited February 2004
    Hi Joe,

    If you set the Report.AllowPrintToFile property to True and assign the
    Report.DeviceType to a file device such as "TextFile", the PrintDialog will
    already have the PrintToFile checkbox checked for you when you load it.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2004
    That was pretty much what I was trying.

    Procedure CiReportOnPrintDialogCreate(
    ptr : Pointer;
    ppReport : TppReport);
    Begin
    this_szSettings :=
    IDS_REGISTRY_REPORT_PRINTTOFILE_FOLDER;
    this_tRegistry := TRegistry.Create;
    ppReport.AllowPrintToFile := True;
    ppReport.DeviceType := dtReportTextFile;
    End;

    Yet, when the print dialog appears, the Print To File is unchecked.

    Could Waler be doing something here?

    Joe

  • edited February 2004
    Hi Joe,

    In my testing (with Waler installed) everything seemed to work correctly.
    Instead of setting these values in the OnPrintDialogCreate, try setting them
    before you call Report.Print and see if that changes the result.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2004
    Actually, the problem appears to be whether I set PrintDialog.PrintToFile,
    vs just setting the device.

    Thanks

  • edited February 2004
    Many of the PrintDialog properties are set automatically based on the report
    property values. Setting these manually could in some cases cause a
    problem. Try removing the code to set the PrintDialog properties manually
    and see if that gives you the results you are after.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2004
    Yes it does - Thanks
This discussion has been closed.