Generating PDF in oracle and emailing it

Hello everybody,

At the moment in our firm we use Oracle db 10.2 version running on linux server.

Now we have a task upon us and that is we have to generate a report every day at exact same time and send it via email (prefer the pdf file format).

Generally we use Oracle reports version 6i to that (yes i know old technology but cant do much about that right now).

Any ideas or working examples os some procedure that can do that are more than welcome.

Thank you for reading!
Caruso_euAsked:
Who is Participating?
 
sdstuberConnect With a Mentor Commented:
try the Anton Scheffer's package for creating pdf files and my own package for sending them

http://technology.amis.nl/2012/04/11/generating-a-pdf-document-with-some-plsql-as_pdf_mini-as_pdf3/

http://www.experts-exchange.com/Database/Oracle/A_7749-How-to-send-email-attachments-with-Oracle.html

small example...


DECLARE
    v_pdf     BLOB;
    v_message CLOB := 'messge text';
BEGIN
    as_pdf3.init;

    as_pdf3.put_txt(
        10,
        20,
        'This is rotated text',
        45
    );

    as_pdf3.query2table(
        'select view_name, text_length, read_only from all_views where owner = ''SYS'' and rownum <= 20'
    );

    v_pdf := as_pdf3.get_pdf;

    sdsemail.send_attach_blob(
        p_sender          => :p_from,
        p_recipients      => :p_to,
        p_subject         => 'Test msg',
        p_message         => v_message,
        p_attachment      => v_pdf,
        p_att_inline      => FALSE,
        p_att_mime_type   => 'application/pdf',
        p_att_filename    => 'test.pdf'
    );
END;
0
 
Sanjeev LabhDatabase ConsultantCommented:
You can create a the report with the format preset to PDF. On your reports server you can submit a cron job and call a shell script. Through the shell script invoke this report and save it on a destination directory. From the shell script only you can send it as a mail to whoever concerned.
0
 
Caruso_euAuthor Commented:
You are saying report server ... we do not have a report server. Oracle reports version 6 does not have server as far as i know.
0
 
Helena Markováprogrammer-analystCommented:
Oracle Forms 6i/Reports 6i is the last client/server version but it is also the first web version. There are forms server and also report server there (I am not sure but it was Apache).
0
 
Caruso_euAuthor Commented:
Thank you!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.