sending email from forms with report in pdf as an attachment [message #401142] |
Fri, 01 May 2009 16:59 |
vinodkumarn
Messages: 60 Registered: March 2005
|
Member |
|
|
I have the following code to send an email with a report as an attachment via forms. everything is running fine.
Now i do not have a message body in the email, so my question is how do i add some text as an email body
if i add the following parameter, its not working
ADD_PARAMETER(thelist, 'BODY',TEXT_PARAMETER, 'Check the attached Report');
DECLARE
report_id REPORT_OBJECT := find_report_object('checklist');
report_message VARCHAR2(100) :='';
rep_status VARCHAR2(100) :='';
v_error Exception;
thelist paramlist;
BEGIN
thelist:= Get_Parameter_List('rep_paramlist');
If NOT Id_Null (thelist) THEN
DESTROY_PARAMETER_LIST(thelist);
end if;
thelist := Create_Parameter_List ('rep_paramlist');
ADD_PARAMETER(thelist, 'FROM',TEXT_PARAMETER, 'admin@samrun.com');
ADD_PARAMETER(thelist, 'SUBJECT',TEXT_PARAMETER, 'Report Attached');
ADD_PARAMETER(thelist, 'PROJECT_NBR',TEXT_PARAMETER, 968404);
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE, SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME, 'CHECKLIST.RDF');
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER, 'rep_calamity');
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE, MAIL );
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESFORMAT, 'PDF');
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESNAME,'vinod@samrun.com' );
report_message := run_report_object (report_id, thelist);
rep_status := report_object_status (report_message);
begin
WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
LOOP
rep_status := report_object_status(report_message);
END LOOP;
exception
when v_error then
message('Error in sending Action Checklist email.'|| rep_status);
end;
end;
|
|
|
|
|
|
|
|
|
Re: sending email from forms with report in pdf as an attachment [message #658876 is a reply to message #548845] |
Thu, 29 December 2016 07:18 |
|
malya
Messages: 22 Registered: August 2015 Location: Hyderabad, India
|
Junior Member |
|
|
Hello Seniors,
Is it resolved ?? I am able to implement above suggestions although I am having two issues.
1. Unable to get message in Email Body.
tried with
ADD_PARAMETER(thelist, 'BODY' ,TEXT_PARAMETER, 'Check the attached Report');
ADD_PARAMETER(thelist, 'MESSAGE',TEXT_PARAMETER, 'Check the attached Report');
2. Mails are coming in same domain(company domain),but unable to send to public domains.
Please help
|
|
|
|
|
|
|
Re: sending email from forms with report in pdf as an attachment [message #679265 is a reply to message #668488] |
Wed, 19 February 2020 09:56 |
|
mosuah
Messages: 1 Registered: February 2020
|
Junior Member |
|
|
Hi.
answering your question.
Reports 6i connects to a mail program that you have installed on your pc in this case it must be 32 bits just like reports to recognize it.
The mail program already has a user and a domain and the password registered when you opened the account, from there you login and send the email that reports passes the parameters.
Reports does not allow add body, subject parameters, because those parameters do not exist as system parameters in reports.
|
|
|