Pl/sql vs oracle reports 6i

Hi I am new to oracle development.
My requirement is to create a text file periodically reading data from oracle tables.
the client wants me to use oracle reports 6i and create a text file. they actually do not have a requirement for a report or this report will not be used in nay other way.
the final output should be text file.
i feel using utl_file package creating the text file on the server is a much better option. for this i thought writing a stored procedure and scheduling this procedure.
please suggest me how i should convince. please give me suggestions in this. thanks in advance..mohan

A while back all reports were just text files, what is the difference between a text report and a text file? If Oracle reports can do it go ahead. If you think it is overhead spool it from SQL*Plus, which as well as being an ad hoc query tool is actually designed as a text only report writer. If you want to you can still use a stored procedure that returns a ref cursor and just print and format the output in SQL*Plus however its wanted.
Don't use util_file, its more code, slower, complicated, you can't just use SQL, you have to loop (though for some reason many programmers seem to see this as an advantage), it can only access the server, Its more suitable for diagnostics, tracing and logging, things the DBA would be interested in, not for the end user or external system interfaces.

Similar Messages

  • Can we use Dynamic SQL in Oracle Reports ?

    Hi ,
    Can we use Dynamic SQL in Oracle Reports ?
    If yes please give some examples .
    Thanx
    srini

    I believe the built-in package SRW.Do_Sql is what you are looking for
    Example from the document:
    /* Suppose you want to create a "table of contents" by getting the
    ** first character of a columns value, and page number on which its
    ** field fires to print. Assume that you want to put the "table of
    contents"
    ** into a table named SHIP. You could write the following construct:
    DECLARE
    PAGE_NO NUMBER;
    PAGE_FOR INDEX NUMBER;
    SORT_CHAR CHAR(1);
    CMD_LINE CHAR(200);
    BEGIN
    SORT_CHAR := :SORT_NAME ;
    IF :CALLED = Y THEN
         SRW.GET_PAGE_NUM(PAGE_FOR_INDEX);
         SRW.USER_EXIT(RWECOP PAGE_FOR_INDEX
         P_START_PAGENO);
         SRW.MESSAGE(2,TO_CHAR(:P_START_PAGENO));
    END IF;
    SRW.GET_PAGE_NUM(PAGE_NO);
    CMD_LINE := INSERT INTO SHIP VALUES
                          (||SORT_CHAR||,||TO_CHAR(PAGE_NO)||);
    SRW.MESSAGE(2,CMD_LINE);
    SRW.DO_SQL(CMD_LINE);
    COMMIT;
    EXCEPTION
      WHEN DUP_VAL_ON_INDEX THEN
            NULL;
      WHEN SRW.DO_SQL_FAILURE THEN
            SRW.MESSAGE(1,FAILED TO INSERT ROW INTO SHIP TABLE);
      WHEN OTHERS THEN
           COMMIT;
    END;

  • Pl/sql in oracle reports 6.0

    Hi ,
    I am new to oracle reports, is there any way to use pl/sql in oracle reports.I mean i have to take aggregate data from Oracle and to print/populate the data according to slabs(Say distance slab or time slab).Can u please provide me sample code...
    mail id : [email protected]
    thanks & regards
    Anand M

    you can use ref cursor in your pl/sql stored procedure and then call it in your reports

  • SQL for oracle Reports

    Hi, I am having trouble developing an oracle report to return information from several tables. The information to be returned is an aggregate operator "Count" and several fields from the tables. I cannot get the sql to compile without error.
    Does anyone know of a good website for oracle reports design with sql?

    Hi,
    Why not paste the SQL code along with the
    error or send it to : [email protected]
    Naresh
    null

  • PL/SQL Portlet & Oracle Report 6i Server??

    Scenario:
    I have 2 portlet:
    a) PORTLET A (is a dynamic menu written in pl/sql)
    Each menu's choice run a report (via cgi) and output is HTMLCSS format.
    b) PORTLET B (written in ?????).
    Question:
    If possible to set the output of Oracle Report into PORTELT B???

    A while back all reports were just text files, what is the difference between a text report and a text file? If Oracle reports can do it go ahead. If you think it is overhead spool it from SQL*Plus, which as well as being an ad hoc query tool is actually designed as a text only report writer. If you want to you can still use a stored procedure that returns a ref cursor and just print and format the output in SQL*Plus however its wanted.
    Don't use util_file, its more code, slower, complicated, you can't just use SQL, you have to loop (though for some reason many programmers seem to see this as an advantage), it can only access the server, Its more suitable for diagnostics, tracing and logging, things the DBA would be interested in, not for the end user or external system interfaces.

  • Calling Oracle Report through AQ

    Does anybody know how to invoke an Oracle Report using Advanced Queuing?
    Any assistance will be greatly appreciated.

    Hi Darryl,
    I believe you can invoke PL/SQL in Oracle Reports. If so, invoke AQ PL/SQL procedures from Oracle reports.
    Thanks,
    Brajesh.

  • Oracle Reports & XML Publisher

    Hallo,
    Will there be a Oracle Reports Server (native) Version for the Application Server 10.1.3 (and beyond) or will this Service be replaced by the XML Publisher?
    Thx, Willi

    BIP is a different tool that pretty much can do the same job. And (it appears to me) that BIP will eventually be replacing Reports. I am sure BIP will undergo a few more versions first...but Reports does not seem to be undergoing any new development (that I know of). This is just my two cents...
    More to the point: You can also use Oracle reports or BIP or both to generate yoru reports and can even use Reports to generate the XML data (from the db of course) and then use this data file to feed into BIP and use BIP format templates to display the data and even have multiple BIP templates for a single data file.
    In may respects BIP format templates are easier to work with (based upon MSWord) than the layout editor in Oracle Reports and this method allows you to keep the (sometimes very complex) sql in Oracle Reports intact, unchanged. However, the use of a MSWord plug in has limitations...
    It is my opinion that currently BIP has many formatting limitations that are not present in Oracle Reports. To overcome these formatting limitations you pretty much need to learn XSL if you have complex reports. And it is not any easier than learning how to use XSL (if you are not a Java/DotNet type) than it is to learn the layout editor in Reports (IMHO) .
    All of the above is my personal perspective based upon 10+ years on Oracle Reports and 14 months on BIP so take it with a grain of salt. I do not nor have I ever worked for Oracle.
    Scott

  • Auto print Oracle report through call to PL/SQL

    I have been tasked with finding a way to generate an Oracle report from a java servlet. Basically they want to pass in parameters to a PL/SQL procedure and have it automatically print out, without user interaction.
    Can this be done?
    Jeff

    I am in a similar situation and have reached a bit of an impass. I am creating the report by means of passing a dynamically created URL from WebDB to the Report Server.
    I have created a procedure to do various things and was planning on calling the report via the procedure using
    OWA_UTIL.redirect_url depending on the params
    that the user entered. Does the UTL_HTTP work in the same means as the aforementioned? Or are they the same thing?
    Regards and thanks,
    Steve
    null

  • How to register a pl/sql report as an Oracle report.

    Guru's,
    I have a requirement to add a Pl/sql report in a shipping document set.
    Shipping document set can contain Oracle reports only(RDF).
    Is there a way we can add pl/sql report in a shipping docuemnt set?
    Thanks
    -Karthik

    Please see these docs.
    Adding PL/SQL Stored Procedure To Document Set. [ID 551154.1]
    Concurrent Programs Of Pl/Sql Attached To Shipping Document Set Is Not Firing [ID 810856.1]
    Concurrent Programs Of Pl/Sql Attached To Shipping Document Set Not Working. [ID 1246184.1]
    Shipping Document Set Containing PL/SQL Program Ends with Oracle Error 6550 in FDPSTP [ID 316221.1]
    Concurrent Program Not Being Called? [ID 956722.1]
    Thanks,
    Hussein

  • SQL Query as Item Source/Oracle Reports w/ HTML DB?

    I have successfully used a SQL Query as an item source in the past on several occasions. However, in this instance, every time I try to do this, I get the following error:
    Error ERR-1019 Error computing item default value: page=3 name=P3_TEST_ITEM.
    ORA-01460: unimplemented or unreasonable conversion requested ORA-02063: preceding line from [database_name]
    If I use the exact same query in creating a report region, the page displays fine and the query returns the correct data. Why might this be happening, and what can I do to fix it?
    Also - off the subject - is there a way to use HTML DB to deploy reports that are created in Oracle Reports Builder? I have created several employee productivity reports for supervisors and managers in HTML DB, which is great for allowing them to run them live and have fields as parameters for varying employees, date ranges, etc... but formatting them to be browser and printer friendly is an absolute nightmare so far. If I could create and format the reports in Reports Builder and then deploy them using HTML DB, while still being able to offer parameters to the user, that would be perfect. Is this possible?

    Here is my query:
    SELECT
    TO_CHAR((sum(decode(ef.production_function,'Y',ef.function_minutes+ef.function_ot_minutes))/60)/8, '9999999.99')
    FROM
    RLAPPLSG.EMPLOYEE_INFO@REMOTE_SERVER EI,
    RLAPPLSG.SC_EMP_FUNCTIONS@REMOTE_SERVER EF,
    RLAPPLSG.SC_EMP@REMOTE_SERVER E
    WHERE
    ( e.SC_EMP_NBR=ef.SC_EMP_NBR )
    AND ( ei.EMP_ID=e.EMP_ID )
    AND (
    ( trunc(( e.SC_DATE )) BETWEEN :P2_BEGIN_DATE AND :P2_END_DATE )
    AND (ei.EMP_MGRS_ID = :P2_SUPERVISOR_ID
    OR ei.EMP_ID = :P2_SUPERVISOR_ID)
    Every table and/or view that is referenced here is done so remotely. The column datatype breakdown is as follows:
    production_function - BOOLEAN
    function_minutes - NUMBER
    function_ot_minutes - NUMBER

  • Using PL/SQL in a formula column in Oracle Reports Builder.

    Hi,
    I need to SUM two record from the result of an SQL interrogation.
    Here's what it looks like
    function CF_1Formula return Number is
    nTot1 NUMBER :=0;
    nTot2 NUMBER :=0;
    begin
         select sum(:TOT1) into nTot1 from table(Q1) ;
         select sum(:TOT2) into nTot2 from table(Q1) ;
         return (nTot1 + nTot2);
    end;I'm kind of new to formula column programming any link of interest would be appreciated.
    The from table(Q1) part Q1 represents my SQL interrogation name and the group below it is G_MAIN.

    Hi Hong Kong King Kong,
    From looking at that function name (and the group name): Is this an Oracle Reports generated function?
    If so, there's also a dedicated Reports forum: Reports
    By the way, I like your synonym for 'query'.
    I'm sure I'll confuse some of my collegues tomorrow when I will mention 'database interrogation' instead of 'query'. ;)
    edit
    Doh...I should not underestimate the information that is posted in thread subjects.
    Edited by: hoek on May 5, 2010 9:24 PM

  • Adding a field to an sql statement in Oracle Reports error ORA-00933

    We have been requested to add a field that already exists in the table referred to by the sql statement in Oracle Reports Builder. The report was set up by a consultant about 3 yrs ago and we don't really have much skill in this area. What is happening when I try to modify the SQL statement, either adding a field or deleting a field to the SELECT statement, causes an error message preventing the statement from being saved. The only way out of the error message is to click Cancel. The error message is
    ORA-00933:SQL command not properly ended
    ORDER BY Program ==> NAME
    Even adding or deleting a space anywhere in the SQL statement causes the error (not adding any new fields). A coworker found that if we comment out the ORDER BY, the statement will accept the new field in the SELECT section, however then we lose the order by functionality. I would like to add one additional field before the FROM. Not sure if any additional data are needed. Thank you.
    SELECT p.person_uid PIDM_KEY, p.id_number ID,
                   p.full_name_lfmi name,            
                    p.BIRTH_DATE, p.GENDER Sex,
                    Decode(a.residency,'D',p.Primary_ethnicity,'F')  Ethn,
                    a.academic_period TERM,        
                    CASE WHEN :p_group_by = 'PROGRAM' THEN a.program
                                 ELSE ' '
                    END AS Program,
                    a.COLLEGE, a.degree, a.major, ' ' rule,
                    a.STUDENT_POPULATION,a.STUDENT_LEVEL,    a.application_status Status,  a.application_status_date app_sts_dte,
                    ad.decision_date1 Last_Dec_Date,
                    ad.decision1||' '||ad.decision2||' '|| ad.decision3||' '|| ad.decision4||' '|| ad.decision5 Decisions,
                    /*  Deposit Date uses the last term entered in :p_term parameter string */
                    (SELECT MAX(deposit_effective_date) FROM usf_as_deposit WHERE account_uid = a.person_uid &term_clause group by account_uid)   AS "DEPOSIT DATE",     
                    ph.phone as PHONE,
                    CASE WHEN PS.FIRST_CONTACT IN ('NET','PAP','COM','COP') THEN PS.First_Contact
                     ELSE CASE WHEN ps.latest_contact IN ('NET','PAP','COM','COP') THEN PS.Latest_Contact
                                ELSE '  '
                                END
                    END AS FIRST_CONTACT,
                    DECODE(:p_address,'Y',REPLACE(adr.street1||' '||adr.street2||' '||adr.street3||' '||adr.city||','||adr.state||' '||adr.nation||' '||adr.zip,'  ',' '),' ') as  address, adr.nation, adr.state,
                    goremal_email_address email, a.residency, a.application_date, p.primary_ethnicity, c.cohort
    FROM MST_ADMISSIONS_APPLICATION A,
               MST_PERSON p,mst_pre_student PS,  Admissions_Cohort c, usf_v_phone_pr_ma ph,
               MST_admissions_decision_slot AD, usf_v_email, usf_v_address_dr_lr_ma_pr adr
    WHERE a.PERSON_UID = p.person_uid
            AND a.curriculum_priority  = 1
            AND a.person_uid = ps.person_uid
           AND a.person_uid = ad.person_Uid(+)
           AND a.person_uid = goremal_pidm(+)
           AND a.person_uid = adr.pidm(+)
           AND a.person_uid = ph.pidm(+)
           AND ph.rnum(+) = 1
           AND a.person_uid = c.person_uid(+)
           AND a.academic_period = c.academic_period(+)
      &Where_Clause
           /*    TAKE OUT FOLLOWING LINE AFTER DATA IS CLEANED UP  */
            AND NOT(p.id_number = '00000000'   OR SUBSTR(p.id_number,1,1) = 'B'  OR UPPER(p.full_name_lfmi)  LIKE '%TESTING%')
           AND  a.application_status_date >= NVL(:p_as_of_date,sysdate-8000)
           AND a.academic_period = ad.academic_period(+)
            AND a.application_number = ad.application_number(+)
            AND a.degree <> 'ND'    /*   AND a.college <> 'LW'                         --  Does not need non-degree and law students    */
           &Cohort_Clause 
    ORDER BY Program  &ORDER_CLAUSE

    Hi Denis,
    I tried your suggestion. The good thing is that adding the comma allowed me to be able to add a.campus to the select statement, unfortunately, another error message happened.
    ORA-00936: missing expression SELECT p . person_uid PIDM_KEY ,
    p . id_number , p . full_name_lfmi name , p . BIRTH_DATE , p . GENDER Sex ,
    Decode ( a . residency , 'D' , p . Primary_Ethnicity , 'F' ) Ethn , a . academic_period TERM ,
    CASE WHEN : P_group_by = 'PROGRAM THEN a I started over and tried only putting in the comma and get the same message even though I didn't add campus. After that, removed the comma which led to the ORA-00933 error message. So once again, I had to close the file without saving, in order for the report to run at all.

  • Connect Oracle Reports to Ms Sql Server DB

    Is it possilbe to Connect Oracle Reports to Microsoft Sql Server database. If yes then how. Please advice.
    Thanks
    Sami.

    It is possible to connect Oracle database to MS Sql server database using the Oracle Transparent Gateway for MS SQL Server.
    You can use the following links to configure such connection:
    Oracle Transparent Gateways - General Description - Part I
    http://oracle-apps-dba.blogspot.com/2008/04/oracle-transparent-gateways-general.html
    Oracle Transparent Gateway for MS SQL Server - Part II
    http://oracle-apps-dba.blogspot.com/2008/04/oracle-transparent-gateway-for-ms-sql_16.html
    Aviad

  • Calling PL/SQL Functions And Open Oracle Reports From ADF Application

    Hi all,
    My company will convert some projects from Oracle forms to Oracle ADF so, we need to call the PL/SQL functions and open the Oracle Reports (which are already exist) from ADF Application.
    Thank You..
    Jack.N

    Hi Jack.N,
    calling PL/SQL Functions -----> http://sameh-nassar.blogspot.com/2010/01/create-plsql-function-and-call-it-from.html
    Open Oracle Reports ---------> http://radio-weblogs.com/0137094/2008/06/15.html
    You will find The Integration between ADF and other systems in ---> http://wiki.oracle.com/page/ADF+Integration
    Sameh Nassar

  • Different Ouptput in SQL & Oracle Report

    Hi,
    I have two tables. (1) TST_P (2) CUSTOMER_LIMIT
    I use one select query for this
    SELECT distinct ORG_ID,CUSTOMER_ID,CUSTOMER_NAME,CUSTOMER_NUMBER,
    (select distinct NVL(sum(amount_due_original),0) from TST_P WHERE CUSTOMER_ID=P.CUSTOMER_ID AND P_FLG='A') A,
    (select distinct NVL(sum(amount_due_original),0) from TST_P WHERE CUSTOMER_ID=P.CUSTOMER_ID AND P_FLG='B') B,
    (SELECT distinct NVL(CREDIT_LIMIT,0) FROM CUSTOMER_LIMIT WHERE DEALER_ID=P.CUSTOMER_ID ) C
    from TST_P P
    GROUP BY ORG_ID,CUSTOMER_ID,CUSTOMER_NAME,CUSTOMER_NUMBER
    ORDER BY CUSTOMER_NAME
    Now when I use this query in SQL prompt it gives perfect output.
    And when i use this query in Oracle Report builder it give some duplicat records.

    Denes,
    I was able to get it working based on one of your examples, it gets ugly when you embed the popup javascript into the link as you know. You have some really great examples, I hadn't been to your page in awhile.
    Here is my end result (this is embedded in a decode statement so single ticks would go around the entire example below)
    &lt;a href="javascript:popUp2('''
    || 'f?p=&APP_ID.:71:&SESSION.::NO:100:'
    || 'P71_EQUIPMENT_ID,P71_CONTAINER_TYPE_ID:'
    || equipment_id || ',' || '&F110_CONTAINER_TYPE_IP.'
    || ''', 900, 600);">'
    || create_date
    || '&lt;/a>
    Thanks to all that helped me out here,
    Justin

Maybe you are looking for