Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

sending email from forms with report as attachment

user517202May 1 2009 — edited Sep 16 2009
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;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 14 2009
Added on May 1 2009
5 comments
2,971 views