Oracle Report In Word ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sduna76
    New Member
    • Mar 2008
    • 1

    Oracle Report In Word ?

    How can transfer data from oracle tables in MS Word
    I have prb with printing oracle report i want to reduce the size of normal page to ID card size
  • subashsavji
    New Member
    • Jan 2008
    • 93

    #2
    Originally posted by sduna76
    How can transfer data from oracle tables in MS Word
    I have prb with printing oracle report i want to reduce the size of normal page to ID card size
    this may be helpful to you

    CREATE OR REPLACE PROCEDURE sal_status
    (p_filedir IN VARCHAR2, p_filename IN VARCHAR2)
    IS
    v_filehandle UTL_FILE.FILE_T YPE;
    CURSOR emp_info IS
    SELECT ename, sal, deptno
    FROM emp
    ORDER BY deptno;
    v_newdeptno emp.deptno%TYPE ;
    v_olddeptno emp.deptno%TYPE := 0;
    BEGIN
    v_filehandle := UTL_FILE.FOPEN (p_filedir, p_filename,'w') ;
    UTL_FILE.PUTF (v_filehandle,' SALARY REPORT: GENERATED ON
    %s\n', SYSDATE);
    UTL_FILE.NEW_LI NE (v_filehandle);
    FOR v_emp_rec IN emp_info LOOP
    v_newdeptno := v_emp_rec.deptn o;
    IF v_newdeptno <> v_olddeptno THEN
    UTL_FILE.PUTF (v_filehandle, 'DEPARTMENT: %s\n',
    v_emp_rec.deptn o);
    END IF;
    UTL_FILE.PUTF (v_filehandle,' EMPLOYEE: %s earns: %s\n',
    v_emp_rec.ename , v_emp_rec.sal);
    v_olddeptno := v_newdeptno;
    END LOOP;
    UTL_FILE.PUT_LI NE (v_filehandle, '*** END OF REPORT ***');
    UTL_FILE.FCLOSE (v_filehandle);
    EXCEPTION
    WHEN UTL_FILE.INVALI D_FILEHANDLE THEN
    RAISE_APPLICATI ON_ERROR (-20001, 'Invalid File.');
    WHEN UTL_FILE.WRITE_ ERROR THEN
    RAISE_APPLICATI ON_ERROR (-20002, 'Unable to write to
    file');
    END sal_status;
    /

    create OR REPLACE DIRECTORY emp_dir as 'c:\';
    /

    execute sal_status('EMP _DIR','C:\YYY.D OC');
    //

    Comment

    • Altasen.com
      New Member
      • Nov 2005
      • 8

      #3
      Hi, if you want to Report in Word, you should check the BI-Publisher. This is a new reporting tool for Oracle.
      How to work with this is described in my book "BI Publisher for Oracle Applications".
      See: http://stores.lulu.com/learnworks and
      our site: www.altasen.com

      What are customers saying about our books:
      "Finally a book that really helps me" (University user, The Netherlands)
      "Wow, Apps is really simple" (HR-user Belgium)
      "Hats off!" (DBA India)

      Roel Hogendoorn

      Comment

      Working...