Home » Developer & Programmer » Forms » sending email from forms with report in pdf as an attachment (forms 10.1.2.0.2)
sending email from forms with report in pdf as an attachment [message #401142] Fri, 01 May 2009 16:59 Go to next message
vinodkumarn
Messages: 54
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 #401895 is a reply to message #401142] Wed, 06 May 2009 20:26 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have you solved your problem?

I think you will find that if you use an output format other than 'PDF' that the report will then appear in the 'body'.

Look at the reports documentation for 'FROM' and at its related keywords and 'body' is not one of them.

David
Re: sending email from forms with report in pdf as an attachment [message #402065 is a reply to message #401895] Thu, 07 May 2009 08:15 Go to previous messageGo to next message
vinodkumarn
Messages: 54
Registered: March 2005
Member
No i have not yet got any solution for my problem
I want to use only PDF and i want the report as an attachment

I am still searching how to attach reports in PDF and also get a text in the body

Thanks
Re: sending email from forms with report in pdf as an attachment [message #402691 is a reply to message #402065] Tue, 12 May 2009 01:48 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Search this forum for 'attach email'.

David
Re: sending email from forms with report in pdf as an attachment [message #438470 is a reply to message #401142] Sat, 09 January 2010 07:25 Go to previous messageGo to next message
sd_md_rizwan@yahoo.com
Messages: 37
Registered: September 2007
Location: Saudi Arabia
Member

Hi this is Rizwan,

I have gone through your post regarding the Oracle Reports,
and I think you have successed in emailing the reports from forms, can you please tell the procedure how to get it done because I also have the same situation with me, I have many reports which I want to send from forms, I am using forms 10g,
I kindly request you to tell me all the coding thins very clearly

Thanks
Re: sending email from forms with report in pdf as an attachment [message #438728 is a reply to message #438470] Mon, 11 January 2010 23:54 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Review the document "Oracle® Database, PL/SQL Packages and Types Reference, 10g Release 2 (10.2), B14258-01, June 2005" for 'utl_mail'.

It can be found at http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/toc.htm

David
Re: sending email from forms with report in pdf as an attachment [message #548845 is a reply to message #401142] Mon, 26 March 2012 11:34 Go to previous message
ashokd98
Messages: 1
Registered: March 2012
Junior Member
Found this post, just curious were you successful in putting in a "body" ?
Previous Topic: Restrict the user to access the records [merged 2 by jd]
Next Topic: pick single value from range (merged 2)
Goto Forum:
  


Current Time: Fri Aug 01 03:07:58 CDT 2014

Total time taken to generate the page: 0.06195 seconds