Oracle Reports 6i and the Dynamic SQL

I use Oracle 8.1.7 and Oracle Reports 6i Builder;
My problem is that I am trying to obtain dataset for the report via stored procedure (using ref cursor). As far as I understand I must specify strongly typed refcursor in my package (specify record type based of which the ref cursor will be created, not just ref cursor without any return specification). But when it comes to my stored procedure implementation, here I would like to use dynamically created SELECT statement and since it will be parsed and executed at runtime I forced to use only untyped ref cursor to return data from the stored procedure.
TYPE my_refcur IS REF CURSOR;
cv_tmp my_refcur;
v_SQL VARCHAR2(2000);
BEGIN
-- here I set v_SQL ....
OPEN cv_tmp
FOR v_SQL;
RETURN cv_tmp;
END;
But this way I somehow need to convert untyped ref cursor to strongly typed one. This is a problem I would like you to help me with.
Thanks in advise.
By the way, I am not familiar with Oracle Reports 9. Does it still require to return only strongly typed ref cursor from stored procedures?

Hello Alexey,
The reason Reports requires strongly typed ref cursors to be returned to it is that, with weak ref cursors the list of columns returned by the cursor cannot be determined at report design time. For a weak ref cursor, the data will be populated based on a query specified only at runtime. As a result, you will not be able to add any layout to your report, since the query group will be empty.
Please take a look at the reply in the post below on the same topic, for a method to retrieve data from a stored procedure returning a weakly typed ref cursor:
Re: Reports On Ref Cursor
Thanks,
Srivas.
The Oracle Reports Team.

Similar Messages

  • Oracle reports 6i and the web

    I have installed the d2k 6.i pack on my NT desktop and am pointing to a 8.1.5 database on another machine. All I have is the Webdb listener up and running. No other Webserver as I was told this was all I needed to run reports on my desktop on the Web.
    The report runs fine on my desktop but when I try to run this report on the Web I get: Page not found
    This is the url:
    http://granite.isearch.com/dev60cgi/rwcgi60.exe?server=Rep60_GRANITE&report=C:\orant\bin\ats0107.rdf&userid=pr_hollydev/orahollydev@r81&destype=cache&desformat=HTML
    My report server is up. My webdb listener is up. I do not have a web server installed besides what came with D2k.
    I did copy the rwcgi60.exe to the OWS/4.0/bin directory
    tnsnames entry:
    REP60_GRANITE.WORLD =
    (DESCRIPTION =
    (ADDRESS = (COMMUNITY = isearch.world)(PROTOCOL = TCP)(Host = granite)(Port = 1949))
    sqlnet.ora
    # Filename......: sqlnet.ora
    # Name..........: isearch.world
    # Date..........: 26-FEB-99 10:58:23
    AUTOMATIC_IPC = ON
    TRACE_LEVEL_CLIENT = OFF
    SQLNET.EXPIRE_TIME = 0
    NAMES.DEFAULT_DOMAIN = world
    NAME.DEFAULT_ZONE = world
    SQLNET.CRYPTO_SEED = "18110733421811237124"
    NAMES.DIRECTORY_PATH = (TNSNAMES,ONAMES)
    DAEMON.TRACE_LEVEL = OFF
    DAEMON.TRACE_MASK = (106)
    authentication_services = (NONE)
    My NT Reg key for REP60
    REPORT60_VIRTUAL_MAP = '/cache/'
    REPORTS60_PHYSICAL_MAP = 'c:\orant\REPORT60\server\cache"
    REPORT60_SHARED_CACHE = "YES"
    REPORTS60_REPORTS_SERVER = "REP60_GRANITE"
    REPORTS60_PATH = C:\orant\REPORTS60;C:\orant\bin;C:\WEB_REPORTS
    I tried the browser test using this and got page not found.
    http://rep60_granite/ows-bin/rwcgi60.exe?
    Do I need to install a web server?
    Thanks
    K
    null

    1. Yes you need a web server
    2. the env. vars:
    REPORT60_VIRTUAL_MAP,
    REPORTS60_PHYSICAL_MAP, and
    REPORT60_SHARED_CACHE
    are no longer needed.
    3. The 'community' part of the Reports sever entry in your tnsnames.ora isn't required.
    Regards
    The Oracle Reports Team http://technet.oracle.com

  • Erratic Report Region Behavior with Dynamic SQL Queries

    I'm running HTMLDB v 1.5.1.00.12 and I've noticed some odd behavior with report regions using dynamic SQL queries. Every so often, our testers will run a page containing a dynamic sql report region and get the following error, (despite the fact the query was working only moments ago and no other developer has touched it):
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    or sometimes
    failed to parse SQL query:ORA-01403: no data found
    The only solution I've found so far is to:
    1) Make a copy of the failed report region.
    2) Disable or delete the original failed report region.
    The new copy of the report region runs without issue.
    My search of the forums turned up the following two threads, but neither provided me with a clear explanation of the cause, and how to avoid it:
    ORA-06502:PL/SQL: numeric or value error: character string buffer too small
    Re: Import Export Error (ORA-06502)
    The columns being returned are below the 4000 character limit, and the rows being returned are far less than 32k in size.
    Could this have anything to do with the way HTMLDB is internally storing the PL/SQL used to generate the dynamic SQL Query? Is there any known issue related to this with that version of HTMLDB?
    This problem occurs without any discernable pattern or consistency, making it hard to determine where I should focus my efforts in tracking down the cause.

    Hi all,
    My report seems to be behaving correctly once i set it to "Use Generic Column Names (parse query at runtime only)" :)
    Cheers,
    Joel

  • Invoke oracle report 10g from database pl/sql package

    Hi
    Is there a way that i can invoke an oracle report 10g from the database pl/sql package? I am working on a requirement that needs to generate a report when one of the criteria is not met.
    Please suggest me on this.

    Thanks for the info.
    I have a scenario where i need to fetch members details like name , email address and so on from the mainframes on the oracle database. Then on the oracle database i need to check if they have a email address or not. If yes then i need to generate a notice and mail it to them. If they don't have an email address, i'll have to print that out in a some centralized location.
    By the way, the notice was developed using oracle reports 10g.
    Now i am developing a pl/sql package which will do the address validation but i didn't know how to call a oracle report to generate the notice in pl/sql procedure.
    As suggested i will try with dbms scheduler and see if that works for me.

  • Oracle Apps Report error "Oracle Reports Server CGI - The Reports Server Engine terminated abnormally."

    Hi ,
    I have modified layout of one existing custom report.
    I have added 3 columns in the report , Now when I execute the report sometimes it gets executed with the newly added columns and sometimes it errors out with below error.
    Error: The requested URL was not found, or cannot be served at this time.
    Oracle Reports Server CGI - The Reports Server Engine terminated abnormally.
    Any pointers in this regards will be appreciated.
    Thanks

    I found there were some srw.message statement ( used for debugging purpose) were there , when I removed those statements. This error was gone.

  • Help with Oracle Report Builder and SQL Server2000

    Hey guys,
    I just installed it Oracle Developer Suite10g with Report Builder and I am trying to use Report builder and wants to connect with SQL Server 2000. The problem that I am running in to is SQL Server 2000 i have is Window Authentication so Does not required to enter user name and password. So how can i connect my report builder to SQL server or is it possible to connect Report builder to SQL server?
    Also, I want to create small practice version of database in Oracle how do i do it? what i mean by that is I installed trial version or Oracle developer 10g from www.oracle.com and now trying to get some knowledge with oracle. Could any one can give me some direction in this matter please.
    Thank You
    Key

    Have a look at the reports help for the purpose header and trailer sections. Here is an exert:
    "Report sectioning enables you to define multiple layouts in the same report, each with a different target audience, output format, page layout, page size, or orientation. You can define up to three report sections, each with a body area and a margin area: the names of the sections are Header, Main, and Trailer. By default, a report is defined in the Main section. In the other sections, you can define different layouts, rather than creating multiple separate reports. If you wish, you can use the margin and body of the Header and Trailer sections to create a Header and Trailer page for your reports."

  • 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

  • Oracle Reports 9i and Java

    Hi all,
    I am new to Oracle 9i reports. I was just wondering if there is any good documentation/tutorial on using Oracle 9i Reports in a J2EE app? Basically, being able to integrate Oracle 9i Reports in a J2EE web application such that you can pass arguments to the underlying SQL query of the reports dynamically through your web app and then it could use Oracle 9i Reports to generate some reports.
    Any comments would be appreciated.
    Thanks,
    Payam.

    Hi:
    I have the same problem as you, and i wanna know if you resolved your problem and how did you integrated oracle reports in java. i wanna use oracle report builder tool.
    Thanks a lot

  • Oracle reports builder and Win7 aero theme

    Hi,
    I did sucessfully instaled Oracle reports builder 10gR2 (e.g. Oracle Developer Suite 10gR2 and patch 10.1.2.3) on Win7 x64 Enterprize. There was a few workarounds, but it is now ok.
    Everything works just fine now, but that blink and baloon message that came on change of color sheme to Windows classic is annoying! Every time I run the Report Builder, windows is forced to change the Aero scheme ti Classic. OK, I figgured out, that if I do not use Aero, this is not an issue anymore. For me it's ok, but other developers in our company will not be glad :)
    The same problem persist at Oracle SQL developer, but there is a solution for it with little change in "sqldeveloper.conf" file "AddVMOption -Dsun.java2d.noddraw=true" .
    Is there any similar setting for Report builder too?
    I would be werry appreciated.
    Thanks.

    Hello,
    Have you used 64-bit binaries?
    Here are the steps that you need to make sure you have accomplished themL
    1- JDK 64 bits to be used
    2- wls1036_generic.jar (java -jar wls1036_generic.jar) or wls1035_generic.jar . It is mandatory to use java from a 64 bits distribution. Using java 32 bits will cause problems.
    3- ofm_frmrpts_win_11.1.2.0.0_64_disk1_1of1.zip
    An workaround is offered in the following thread:
    Oracle Reports 11g installation problem
    regards,
    Alex
    If the answer helped, please mark it accordingly.

  • Oracle Report toolkit and 3rd components

    Hi folks:
    I am a newbie to Oracle (10g) realm who am expected to write reporting functionality.
    My question is what the report tool out of the box in Oracle and is there any 3rd components for wrting reports?
    Thanks,
    Ricky

    user12086319 wrote:
    Hi folks:
    I am a newbie to Oracle (10g) realm who am expected to write reporting functionality.
    My question is what the report tool out of the box in Oracle and is there any 3rd components for wrting reports?
    Thanks,
    RickyHi Ricky and welcome to the forum
    Could you please elaborate more? What do you exactly want? You can run any sql at SQL*Plus and take the output as report
    You can use Oracle Reports to create a report or you can use Crystall Reports as third part utility

  • OLE DB provider 'OraOLEDB.Oracle' reported an error The provider did not gi

    Hi, I've setup oracle client tools on a windows server that runs sql server 7
    tnsping works as well as the client tool test feature on my sid.
    However, I can't seem to use it from SQL Server. I've installed and uninstalled the client tools many times, I'm beginning to think perhaps I installed the wrong package. Weird thing is there is no Listener listed in Windows Services, yet the listener I setup is working.
    I enabled the allow in process property of both the MSADAORA and Oracle OLE drivers from SQL Server, help!!
    SELECT * FROM OPENQUERY(ORACLE_MIRROR, 'select count(1) from dual')
    RESULTS IN:
    Server: Msg 7399, Level 16, State 1, Line 1
    OLE DB provider 'MSDAORA' reported an error.
    [OLE/DB provider returned message: Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation.
    Provider is unable to function until these components are installed.]
    OLE DB error trace [OLE/DB Provider 'MSDAORA' IDBInitialize::Initialize returned 0x80004005:   ].
    THIS IS AFTER I HAVE INSTALLED THE ORACLE 10.2 CLIENT TOOLS AND SETUP A LISTENER AND TESTED SIDS OK.
    UTILIZING THE ORACLE OLE DRIVER IN THE LINKED SERVER I GET THIS ERROR:
    Server: Msg 7399, Level 16, State 1, Line 1
    OLE DB provider 'OraOLEDB.Oracle' reported an error. The provider did not give any information about the error.
    OLE DB error trace [OLE/DB Provider 'OraOLEDB.Oracle' IDBInitialize::Initialize returned 0x80004005:  The provider did not give any information about the e                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    The MS OLEDB for Oracle was built some time ago and requires an older SQL*Net version:
    OLE/DB provider returned message: Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation.
    => see Oracle Version V7.3.3 ... but you have installed V10; so the OLEDB driver from MS tries to locate old SQL*Net client library files which are not available in your installation anymore.
    So best would be to use the Oracle OLEDB driver coming with the SQL*Net client you have installed.
    As you mentioned this causes a different error:
    Server: Msg 7399, Level 16, State 1, Line 1
    OLE DB provider 'OraOLEDB.Oracle' reported an error. The provider did not give any information about the error.
    OLE DB error trace [OLE/DB Provider 'OraOLEDB.Oracle' IDBInitialize::Initialize returned 0x80004005: The provider did not give any information about the e
    This error is related to the OLEDB process running by default in "out-of-process" mode which doesn't work with Oracle OLEDB driver. By setting a key in the registry under SQL Server this can be changed to run in-process (the default) the provider will work:
         HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Providers\ORAOLEDB.ORACLE
    Change the value of the key "AllowInProcess" under the "OraOLEDB.Oracle" folder
    to a hexadeciaml value of 1.
    If the key does not exist create it as a new DWORD value.
    See also:
    Article-ID:         Note 260775.1
    Title:              ORA-12560 Attempting to Query the Oracle Database from
                        Microsoft SQL Server's SQL Query Analyzer Using the Oracle
                        Provider for OLE DB                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Connecting a report region and a PL/SQL region

    Hi,
    I have created a report region whith pagination that only show 1 row at a time. I can then navigate backwards and forwards through this recordset. The first reportcolum in this recordset contains a number.
    I have also, on the same page, created a PL/SQL procedure region. What I want is to use the number from the SQL region as an input to the PL/SQL region. So when I navigate through the report (Using the pagination arrows), the PL/SQL region is in sync with the record I'm currently seeing in the report.
    Is this possible or do I have to try something different?
    Regards
    Trond

    Hi Trond,
    If you only want to show one record in your first region, it might be best to work with page items, retrieve one record at a time and use that data as the source for your page items. It's easier to implement and easier to reference those values in your second region. Reports are great if you have more then one record.
    Having said that, there are ways to implement it the way you outlined it in your posting. Granted it's not very elegant but it serves its purpose. You could write your own PL/SQL package, use this to set a global to the current row's primary key value and reference that global in your second region.
    Create your package as follows:
    create or replace package md_sample as
    g_pk_value number;
    function set_value(p_value number) return number;
    end;
    create or replace package body md_sample as
    function set_value(p_value in number) return number is
    begin
    g_pk_value := p_value;
    return 1;
    end;
    end;
    Now you need to make sure that your report calls this package appropriately. Calling this as part of your SQL statement won't work properly as it would also be called for records not currently shown on your page. A better way would be to use it for a PL/SQL expression within your report template definition. Pick a custom report template for your report and edit that template. Scroll down to the condition for the first column template and pick “Use Based on PL/SQL Expression”. Then type in the following expression (this is based on a select deptno, dname, loc from dept report):
    md_sample.set_value(#DEPTNO#)=1
    After that you'll be able to reference the global md_sample.g_pk_value. You could e.g. use this as the source for page items shown in your second region.
    Hope this helps,
    Marc

  • Interfacing of oracle report builder and java

    hi all,
    I have build a report using Oracle Report Builder 10g.Now i want to make use of this report in displaying the data in IE using core java.
    This is the first time i am using the Oracle Report Builder .
    Can anyone tell me how to proceed in right direction?Do i need to have some specific Jar,Environment to accomplish this task?
    Thanks in advance

    I'm not sure what version of the product you're using, but since you're just installing it may well be the base version (6.0.8.8.3).
    Similar issues were addressed in a patch release (6.0.8.12), which was related to issues with some types of keyboard. You may want to upgrade to the latest patch release and retry.

  • Report ZRD_SDORDER_DEL and the table /SAPAPO/SCHEDLIN

    Hi
    I am in the process of reducing the amount of data in our SCM database using the report /SAPAPO/ZRD_SDORDER_DEL.
    The report should be deleting data in the /SAPAPO/SCHEDLIN table but the summary report shows that 0 records have been deleted.
    I have run an SQL trace on the report and it shows that it trying to delete records in the SCHEDLIN table using the GUID column.  Getting the GUID value from the trace and using this value in the ITEM_GUID my queries returns 2 records.
    I am a Basis consultant so I don't know the business process/linkage for the tables utilised by this report.  The SCHEDLIN table has approx 110 million rows & I am concerned that these records will be orphaned by the /SAPAPO/ZRD_SDORDER_DEL report and never deleted.
    Should this report be using the ITEM_GUID to delete these records?
    Thanks in advance.
    Doug

    Hi Doug,
    ZRD_SDORDER_DEL is not a standard SAP program, it was customized by your client.  It is difficult to  evalutate whether it was designed properly.  If I were in your position, I would first talk to the developer who created it.  If the developer is not available, then I would have a functional analyst and a technical analyst look at the design specs.
    SAP recommends running their standard program /SAPAPO/SDORDER_DEL on a regular basis to reorganize tables that contain SD order data that is no longer required.  Although I am not an ABAPer, I would assume that it would take care of any superflous table entries that can be successfully deleted.
    Refer to SAP's OSS Note 553476
    [https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=553476]
    For all the techy stuff about this standard SAP program.
    Regards,
    DB49

  • Installed Oracle reports 6i and 9.04 form home

    I had Oracle Forms 4.5. & Report 3.1. in my old system (windows NT).
    My goal is to upgrade Oracle Forms & Reports onto 10g DS.
    I used windows XP for this purpose.
    I have successfully ungraded Oracle Forms to 10g.
    First I installed Forms 6i. (applied latest patches)
    I opened all forms from the 4.5 into 6i and make its work.
    I have installed Oracle Forms 10g in another/Separate Oracle Home & applied
    latest patches.They have upgraded.
    Now I need to do same process for Oracle Report.
    So I start install Oracle Reports 6i.
    My goal is to install Oracle Reports in separate Oracle Home.
    But It does not ask any directory.
    And its starts installing under Oracle Forms (9.0.4) Oracle Home.
    I was so late to stop installation.
    Now I am not able to use Oracle Forms 10g.

    hello,
    i am afraid you destroyed your installation, or at least messed it up.
    i would suggest you install 6i first, and then install 10g (9.0.4) that way you can install 10g in a separate home. not sure if the 6i installer was multi-home capable.
    thanks,
    ph.

Maybe you are looking for