Home » Developer & Programmer » Reports & Discoverer » HOW WE CAN SEND SALARY SLIP REPORT TO EACH EMPLOYEE EMAIL?
HOW WE CAN SEND SALARY SLIP REPORT TO EACH EMPLOYEE EMAIL? [message #259558] Thu, 16 August 2007 00:05 Go to next message
nagendra.oracle
Messages: 1
Registered: August 2007
Location: INDIA
Junior Member

HI,
I have a salary slip report,in each page their are 3 salary
slip,and i want to send these slip to their employee,

how we can do it?

Thanks, in advance.
Re: HOW WE CAN SEND SALARY SLIP REPORT TO EACH EMPLOYEE EMAIL? [message #259709 is a reply to message #259558] Thu, 16 August 2007 05:22 Go to previous messageGo to next message
sanka_yanka
Messages: 184
Registered: October 2005
Location: Kolkata
Senior Member

Just write a procedure to send a mail through database ,call the report before calling the proc and attached that report with the mail & send it.

Cheers
Sanka
Re: HOW WE CAN SEND SALARY SLIP REPORT TO EACH EMPLOYEE EMAIL? [message #260306 is a reply to message #259558] Sat, 18 August 2007 05:11 Go to previous message
raniahalga
Messages: 6
Registered: August 2007
Junior Member

Pls find attached example may solve your problem:


/* Suppose you have the following two reports:
** MGR_RUN, which queries manager names, and invokes a second report named MAIL_IT
** MAIL_IT, which queries employee names for the manager that MGR_RUN passes it,
** and sends the report output to the manager via e-mail.
** The description of MGR_RUN could be as follows:
** Query:
SELECT ENAME, EMPNO FROM EMP WHERE JOB='MANAGER'
** Group Filter:
*/


FUNCTION FOO RETURN BOOLEAN IS
BEGIN
srw.run_report('report=MAIL_IT
desname='||:ename ||' desformat=dflt batch=yes
mgr_no='|| TO_CHAR(:empno) );
RETURN (TRUE);
EXCEPTION
when srw.run_report_failure then
srw.message(30, 'Error mailing reports.');
raise srw.program_abort;
END;

/* This PL/SQL invokes MAIL_IT, specifies that MAIL_IT's output
** should be sent to the manager via Oracle Mail, and passes the
** manager number, so that the MAIL_IT report can query only the
** manager's employees.
** Note: EMPNO's values must be converted to characters
** (TO_CHAR in the PL/SQL above), because SRW.RUN_REPORT
** requires a character string.
** Layout: None is needed, because this report only fetches data,
** then passes it to a second report.

** The description of MAIL_IT could be as follows:
** Query:
SELECT DEPTNO, ENAME, SAL FROM EMP WHERE MGR=:MGR_NO
** Layout: Master/Detail
*/

/* Suppose that you have three reports that you almost always run together.
** The reports are named SALARY, COMMISS, and TAXES. To run these reports
** with one RWRUN60 command, you create a driver report named PAYROLL.
** The description of PAYROLL could be as follows:
** Query:
SELECT DEPTNO FROM DEPT

** Before Report Trigger:
*/


FUNCTION FOO RETURN BOOLEAN IS
BEGIN
srw.run_report('batch=yes report=SALARY
destype=file desformat=dflt desname=salary.lis');
srw.run_report('batch=yes report=COMMISS
destype=file desformat=dflt desname=comiss.lis');
srw.run_report('batch=yes report=TAXES
destype=file desformat=dflt desname=comiss.lis');
RETURN (TRUE);
END;

/* Layout: Tabular
** When you run PAYROLL from the designer or RWRUN60, the other three
** reports will all be run. (Note that, in this case, the query and
** the layout for Payroll could be anything. They are only used here
** in order to make it possible to run PAYROLL.)
*/

Previous Topic: displaying urdu characters in report builder
Next Topic: FRM-41213 Unable to Connect Report Server. after installing Report Server
Goto Forum:
  


Current Time: Fri Jul 05 06:12:57 CDT 2024