Home Devices

Auto numbering when creating a BMP with TExtraDevices

edited October 2002 in Devices

Thanks in advance to all who dare to answer!

Windows 2000 Server (Server)
Windows 2000 Professional (Workstations)
Report Builder Enterprise for Delphi 6 (update patch 2)
TExtraDevices version 2.0
AsyncPro 4.04

I have a project that uses AsyncPro to fax reports generated in my
system to the clients. In order to do this, I have to convert the report
to a BMP file so the graphic images within the report are not lost. (If
the user selects the destination as fax, that is). I have set
TExtraDevices properties for the GraphicFile to UseTextFileName as True.
I set the TextFileName based on which report the user is attempting to
fax, and the devicetype to 'GraphicFile'. At some point during the
generation, the file name gets an additional numeric value added (ie:
Original file name: C:\Available Reports.bmp becomes C:\Available
Reports0001.bmp when it is actually generated.)

Q: Can I change this behavior to not force the numeric value to be
added? (Ideal)

Q: Can I retrieve the correct name after generation so I can pass it to
the FaxClient module? (less then ideal but I can live with this)

Q: Is there a better way? (Cause I don't want to exclude anything that
might help).

If I can provide any other information to make this clearer, let me
know. This project is behind and the client is getting antsy, but I
can't send it out as is, because I don't know the actual file name that
was generated (to pass to the Fax conversion routine). ANY help would be
deeply appreciated!

Cenay' Nailor

Comments

  • edited October 2002
    Bitmaps do not support multiple images in one file, so each page
    must be a separate file with a unique name.

    The format of the filename is textfilename + page#.bmp

    1. You can do a directory search for textfilename + '*.bmp' to read the files.
    2. You can query the pages generated and build the file list yourself
    3. There is a FileList property of the device that includes the file generated,
    but you would have to access this before the report frees the device (AfterPrint event, etc)
    4. You can create the device in code and call the printtodevices method of the report. You
    can then access the filelist after printtodevices.

    Jim
  • edited October 2002

    It is TExtraDevices that is auto-numbering the file names. Look for an
    option in TExtraDevices that will turn this off, trace the source code,
    and/or contact support@waler.com.

    --
    Nard Moseley
    Digital Metaphors
    http://www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.