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

How To Determine Type of Format Selected

edited October 2001 in General
How do I determine which type of output format a user selected after they
select the Print button? I need to determine if a user selected HTML or
not. I already have TExtraDevices, but it has some problems generating my
reports correctly and I will do this on my own.

--
Jeff Kreider

Comments

  • edited October 2001
    You can read the Report.PrintDialog.DeviceType property to see which device
    they selected to print in the PrintToFile device drop down list of the print
    dialog. Use the Report.OnPrintDialogClose event.

    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited October 2001
    That works great Jim! Thanks. This brings up 2 questions.

    1) How can I close the preview dialog via code?
    2) How should I stop the execution of the print command (user pressing the
    Ok button)? Currently I am using Abort.

    --
    Jeff Kreider

  • edited October 2001
    1. You can't close the preview form while the report is generating. You
    should be able to call Report.PreviewForm.Close.

    2. The pages that have been generated, will be sent to the printer. They
    can't be cancelled from RB at this point. You'll need to interupt the
    printer job


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.