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

Detect export device type after selecting print from preview.

edited March 2012 in General
I am trying to setup a report to print the column names as the first
row when exporting to a comma delimited text file or an XLSData file.
I have setup a title band with the column names and set the title band
property to visible if the Report.DeviceType is TextFile or XLSData.
This all work ok - except when I preview the report first.

If I preview the report first, and then from the preview form select
to print and select to export the file from the report print dialog,
the Device Type shows Printer and I can't see any way to determine
what type of export file the system is printing to to enable the title
band to be included in the export file.

Any suggestions much appreciated.

Comments

  • edited March 2012
    Hi Peter,

    Once the print dialog has closed (OnPrintDialogClose), try checking the
    Report.PrintDialog.DeviceType property rather than Report.DeviceType to
    determine which file device was selected.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.