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

Confusing email dialog response

edited February 2011 in General
D7, RB12.03

Using the standard email dialog and button in the preview screen. When I
click on the Email button, some reports are generating the RB Email dialog.
But on some other reports, it pulls up the outlook send mail dialog. I want
it to always pull up the RB dialog and I am quite confused as to why it
behaves differently on different reports.

Thanks,
Bob

Comments

  • edited February 2011
    Hi Bob,

    Everything dealing with the Email feature is controlled by the EmailSettings
    property. See the TppEmailSettings topic in the RBuilder help for more
    information.

    PreviewInEmailClient := True; //This will show the Outlook (or default)
    email window.

    ShowEmailDialog := True; //This will show the built-in email dialog.

    By default the PreviewInEmailClient property is set to True and the
    ShowEmailDialog property is set to False. You will need to alter these in
    order to get the effect you are after.


    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2011
    Is it possible these settings are saved with the report? I have
    PreviewInEmailClient set to false and ShowEmailDialog set to true. But,
    some reports seem to ignore this.

  • edited February 2011
    Hi Bob,

    Yes, if you are loading templates, this information is saved. You will need
    to use the template event OnLoadEnd to alter the properties after the
    template has been loaded.

    http://www.digital-metaphors.com/rbWiki/Design/Templates/Using_Template_Events

    Regards,

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

    "Bob Tucker" wrote in message news:4d612828$1@mail....

    Is it possible these settings are saved with the report? I have
    PreviewInEmailClient set to false and ShowEmailDialog set to true. But,
    some reports seem to ignore this.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2011
    I followed the steps in the wiki article to create my on OnLoadEnd event. I
    placed the following in the procedure but when I run the report I get an
    access violation. Any suggestions?

    TppPrintPreview(ppReport1.PreviewForm).EmailButton.Visible := False;

  • edited February 2011
    Hi Bob,

    Are you perhaps mixing up thread questions?

    You cannot alter the PreviewForm inside the OnLoadEnd event because the
    PreviewForm has not yet been created. This is why you are getting an AV.
    In your previous post on this thread, you mentioned that you simply wanted
    to change some of the EmailSettings properties. The OnLoadEnd event is the
    correct place to do this.



    Regards,

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

    "Bob Tucker" wrote in message news:4d628b17$1@mail....

    I followed the steps in the wiki article to create my on OnLoadEnd event. I
    placed the following in the procedure but when I run the report I get an
    access violation. Any suggestions?

    TppPrintPreview(ppReport1.PreviewForm).EmailButton.Visible := False;

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2011
    You are right and I will get on the correct thread. Sorry.

This discussion has been closed.