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: 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 #401895 is a reply to message #401142] Wed, 06 May 2009 20:26 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS 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: 60
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: 10181
Registered: March 2005
Location: Surges Bay TAS 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: 10181
Registered: March 2005
Location: Surges Bay TAS 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 messageGo to next message
ashokd98
Messages: 1
Registered: March 2012
Junior Member
Found this post, just curious were you successful in putting in a "body" ?
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 Go to previous messageGo to next message
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 #658877 is a reply to message #658876] Thu, 29 December 2016 07:59 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
malya wrote on Thu, 29 December 2016 08:18

2. Mails are coming in same domain(company domain),but unable to send to public domains.
What does that mean?
Re: sending email from forms with report in pdf as an attachment [message #665106 is a reply to message #401142] Tue, 22 August 2017 01:43 Go to previous messageGo to next message
Sana Asghar
Messages: 1
Registered: August 2017
Junior Member
Do you find any solution for this??? I am unable to send email through this procedure can u guide me how i can send oracle report as an email attachment?
Re: sending email from forms with report in pdf as an attachment [message #668488 is a reply to message #401142] Tue, 27 February 2018 10:55 Go to previous messageGo to next message
shabbier.sa
Messages: 20
Registered: May 2014
Location: UAE
Junior Member

Where did you set your mail server and port to send emails
Re: sending email from forms with report in pdf as an attachment [message #668489 is a reply to message #668488] Tue, 27 February 2018 11:08 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
shabbier.sa wrote on Tue, 27 February 2018 08:55
Where did you set your mail server and port to send emails
This thread is only about 8 YEARS OLD, so you should NOT expect a timely or useful response.
If you wish to really be helpful, consider to respond to threads started "recently"; which does not include threads started in 2017 or before.
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 Go to previous message
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.
Previous Topic: Alert firing several times
Next Topic: Check box not selecting the correct value
Goto Forum:
  


Current Time: Thu Mar 28 16:41:12 CDT 2024