Home Devices
New Blog Post: Email: Multi-Service

Email and Print Dialog Don't Always Work

edited September 2011 in Devices
RB 12.04 Server / Delphi 2007 / Oracle 10G

I'm setting these two values and some others on all reports in the client
before I run them to the screen via Report.print and for most (1000+) this
works great. I get the print dialog and Email preview as expected.

rsClientReport.EmailSettings.Enabled := true;
rsClientReport.ShowPrintDialog := true;

I have a group of reports, perhaps 50 or so, that the Email button and print
dialog buttons don't work properly. The Email button does nothing and the
print button goes directly to the printer, bypassing the print dialog.

The reports were last saved using version 10.06, re-saving using version
12.04 had no affect.
I verified the two settings are in fact true just before the call from the
client and in RAP Report.BeforePrint.

I'm stumped as to why this group of reports are not behaving the same way as
all the others and why the Email and print settings aren't working. It's as
tho something is resetting or clearing these values before the report is
executed. ( I looked and don't see anything anywhere )

Any ideas? Thanks.


  • edited September 2011
    Hi Jon,

    Based on the fact that most of your reports function correctly, there
    must be something different about the 50 or so reports that do not. My
    first suggestion would be to comment out all event code relating to
    these reports and then try to email or print it. If this solves the
    problem, try periodically adding the event code back to find where the
    problem is occurring.

    Another item to be sure about is that the code setting the EmailSettings
    and ShowPrintDialog properties is actually firing for these reports
    after the template is loaded.

    Best Regards,

    Nico Cizik
    Digital Metaphors
This discussion has been closed.