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

Report.SendMail

edited November 2007 in RAP
Hi there!

I want to decide within a report whether it will be sent as email or to a
printer but i get an error when i attempt to compile this code.
It seems that the Report.SendMail is not available with RAP. Is this
correct,and is there a way round this?

See code below.

Best regards,
Terje Syversen


procedure GroupHeaderBand3BeforePrint;
begin
if (Business['bu_confirmtype']='EPost') AND (Business['bu_email'] <> '')
then
begin
Report.EmailSettings.FileName :=
FormatDateTime('ddmmyy_hhmmsss',CurrentDate)+'.pdf';
Report.EmailSettings.Recipients.Add(Business['bu_email']);
Report.EmailSettings.CarbonCopy.Add('terje@pcp.no');
Report.EmailSettings.Body.Add('Bookingbekreftelse fra Idre-fj?ll');
Report.EmailSettings.Body.Add('Hei p? deg '+Business['bu_name']);
Report.EmailSettings.Body.Add('Se detaljer i vedlegg! ');
Report.SendMail;
end;
end;

Comments

This discussion has been closed.