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

How to detect when a export to excel file has been selected

edited April 2005 in General
I need to turn of the headers in a report if an end user selects export to
excel.

I had a previous reply to use the on before print event but this is to
early.

What event triggers when you click the print button on the print dialog
screen?

Cheers

SteveW

Comments

  • edited April 2005
    Also what is the syntax for if export to excel selected print the header
    band once.

    Cheers

    SteveW


  • edited April 2005
    > I had a previous reply to use the on before print event but this is to

    why is it too early? it should work fine. something like:

    for I := 0 to ppReport1.Publisher.DeviceCount -1 1 do
    if ppPreport1.Publisher.Devices[I] is [device class] then
    ...

    Ed Dressel
    Team DM
  • edited April 2005
    I have added the following on the before print event but it does not trigger
    if the device type is set to excel

    if ppreport1.DeviceType = 'ExcelFile' then showmessage ('test if set to
    excel');


    Stevew@Parkforce.com
  • edited April 2005
    You need to check:

    if ppreport1.PrintDialog.DeviceType = 'ExcelFile' then showmessage ('test if set to


    James Waler
    Waler Ltd
    http://www.waler.com
This discussion has been closed.