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

Devicetype reset on preview

edited October 2001 in General
If I setup printtofile to true, devicetype to 'ExcelFile' and filename to
'text.xls' and I dont use the preview, the print dialog windows show the
correct setting. But if I first preview the output, the devicetype ist reset
to textfile.

The user now can not just mark the checkbox 'export/output to file'. He also
has to set the devicetype again. It would be nice, if the device type would
not be reset to textfile. Resetting is done in ppPDlg.pas.

Albert Kessler

Comments

  • edited October 2001
    The device type can be set on the print dialog. If Report.DeviceType is
    screen, so it can be previewed on the call to Report.Print, you can then set
    the print dialog to always default to the excel option in the
    Report.OnPrintDialogCreate event when selecting the print button from the
    preview form.

    procedure TForm1.ppReport1PrintDialogCreate(Sender: TObject);
    begin
    ppReport1.PrintDialog.DeviceType := 'ExcelFile';
    end;


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.