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

Export filename

edited April 2005 in General
Once I exported a file as an excel file. How do I capture the filename that
is I have saved as.
ie. documents was saved as c:\test.xls in the file save dialogue.
I then can use this to attache to an email

Cheers


SteveW

Comments

  • edited May 2005
    Hi Steve,

    Try checking the TppFileDevice.FileName property of the specific file device
    you are using in the AfterPrint Event.

    (Instead of TppFileDevice, use your specific device type)

    procedure TForm1.ppReport1AfterPrint(Sender: TObject);
    var
    liIndex: Integer;
    lDevice: TppFileDevice;
    begin

    for liIndex := 0 to ppReport1.Publisher.DeviceCount - 1 do
    begin
    if ppReport1.Publisher.Devices[liIndex] is TppFileDevice then
    lDevice := TppFileDevice(ppReport1.Publisher.Devices[liIndex]);
    end;

    ShowMessage(lDevice.FileName);
    end;

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2005
    Many thanks


This discussion has been closed.