Email Button Missing

This is going to be a really dumb question, so apologies in advance.

I'm playing around with emailing, and I ran into (other unrelated) problems and thought I'd create a basic application from scratch. I place a tdataset, pipeline, report, etc and hook them all up.

I set the TppReport.EmailSettings.Enabled := True and preview the report to screen. I expect the email button in the top left to appear, but it isn't. It's just the printer, a blank space, and then the search button.

I swear I've seen that button before, but it's gone now. We did recently update to RB 19, but I doubt it's that. Any ideas?


  • Hi Dusten,

    If the Report.EmailSettings.Enabled is set to True, the email button should appear. The only reasons it wouldn't is that it is being set to false elsewhere or your code is not executing.

    Are you loading templates? If so, be sure to set this property after the template is loaded.

    If you set the EmailSettings.Enabled property at design-time in the Delphi object inspector do you get the same behavior?

    Best Regards,

    Nico Cizik
    Digital Metaphors
  • edited September 2019
    Yeah I wouldn't be surprised at all if my code was switching it off somewhere. That's why I created a brand new project to test this. Literally the only code I've written is Report.Print. I can package it up for you but it does connect to Advantage Database. (And I have set the EmailSettings.Enabled to True in design time and no templates).
  • As a test, try creating a new Delphi app with a report and button on a form. Set the EmailSettings.Enabled to True and call ppReport1.Print from the button OnClick.

    You can also try tracing into the TppPreview.BeforePreview routine where the visibility of the button is set. You will need to alter your library path to use the \RBuilder\Source directory.

    Best Regards,

    Nico Cizik
    Digital Metaphors
  • edited September 2019
    Ugh, I figured it out. It had to do with my (unrelated) problem. I'm figuring out how to use the "Email New File" on the ppGroup setting.

    In ppProd there's a line that was switching EmailSettings.Enabled to false. I had a single Group on the report with the "Email New File" setting checked.

    ppProd line 2574
    FEmailSettings.Enabled := (FEmailSettings.Enabled) and (HasEmailGroups = False);

    Knew it'd be a dumb question.

    Sorry for taking up your time here.
Sign In or Register to comment.