Basic Report Run from a PL/SQL Procedure

I am hosed trying to start a BI Publisher report from a PL/SQL procedure. Basically, I have a procedure with a local variable defined as an XMLType. I need to call an RTF source, pass the xmlfile in and tell the RTF Engine where to send the output.
The users guide implies that it involves calls to a Java program and I am totally ignorant of Java.
I have successfully linked the RTF source into the XML_Publisher application and previewed it against a known data set. hat works.
So, if I have a PL/SQL package with the local variable L_XML defined as XMLTYPE
and an output file L_OUTBUT defined as VARCHAR2(100), what do I use to call the RTF Processor and generate the report to the output file?
That is
declare
l_xml xmltype;
l_output varchar2(100);
begin
-- stuff to build the xml variable
-- insert the call to FTP Processor here Apparently, it should be
-- something like
package.procedure('linked_rtf file name', l_xml, l_output);
end;
If this calls a Java script, would also appreciate a sample copy of the script.
My need is desperate so any assistance will be greatly appreciated.
Many thanks
Frank

I don't think you can. The parameters passed to a VB dll are formatted differently than a C dll, especially strings. I know a C program has to use special data structures when working with a VB dll, and this is basically what Oracle is doing.
It should be possible, however, to create a C dll that acts as a wrapper for the VB dll. I'm not sure this would save you anything, though. If you have to do that you may as well write the function in C.

Similar Messages

  • How to start a report on the reports server from a pl/sql procedure

    I would like to start or queue a report on the reports server / cartridge from within a serverside pl/sql procedure along with passing report parameters.
    Can I use the package utl_http and if yes, how?
    null

    Hi,
    Before this you have to prepare your internal table with tab delimeter structure with data.
    data: wa_appl_title like line of appl_title.
           concatenate fhdr '/file_details_'
                        sy-datum '_' sy-uzeit '.txt' into fhdr.
    *MOD01 - start.
           open dataset fhdr for output in text mode." ENCODING DEFAULT.
            open dataset fhdr for output in text mode ENCODING DEFAULT.
    *MOD01 - end.
            if sy-subrc = 0.
              clear wa_appl_title.
              read table appl_title into wa_appl_title index 1.
              if sy-subrc = 0.
                transfer wa_appl_title to fhdr.
              endif.
              loop at appl_it.
                transfer appl_it to fhdr.
              endloop.
              close dataset fhdr.
              write: / text-t05.
            else.
              write: /  text-t04.
            endif.
    After this you view in AL11 tranx.
    let us know any thing else you need.
    Thanks,
    Deepak.

  • Invoking a BPEL process from a PL/SQL procedure(URGENT)

    hello,
    Is it possible to invoke a BPEL process from a pl/sql procedure??
    Please reply ...

    Yes it is.
    On my current project i needed this too.
    http://orasoa.blogspot.com/2006/11/calling-bpel-process-with-utldbws.html
    Re: Error running demo PL/SQL consuming web services
    I used this utl_http example:
    declare
    soap_request varchar2(30000);
    soap_respond varchar2(30000);
    http_req utl_http.req;
    http_resp utl_http.resp;
    launch_url varchar2(240) ;
    begin
    soap_request:='<?xml version="1.0" encoding="UTF-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header/>
    <soap:Body xmlns:ns1="http://xmlns.oracle.com/testtask">
    <ns1:testtaskProcessRequest><ns1:input>leeg</ns1:input></ns1:testtaskProcessRequest>
    </soap:Body>
    </soap:Envelope>';
    http_req:= utl_http.begin_request('http://yourhostname/orabpel/default/testtask/1.0'
    ,'POST',
    'HTTP/1.1'
    utl_http.set_header(http_req, 'Content-Type', 'text/xml') ;
    utl_http.set_header(http_req, 'Content-Length', length(soap_request)) ;
    utl_http.set_header(http_req, 'SOAPAction', 'initiate');
    utl_http.write_text(http_req, soap_request) ;
    http_resp:= utl_http.get_response(http_req) ;
    utl_http.read_text(http_resp, soap_respond) ;
    utl_http.end_response(http_resp) ;
    dbms_output.put_line(soap_respond);
    end;

  • Generating an xml from a pl/sql procedure

    Hi Friends,
    I have come up with a requirement to generate an xml from a pl/sql procedure.
    I did some R & D and also got some sample procedures but could not understand the datatypes being used.
    The procedure declares variables like this:
    doc                  xmldom.DOMDocument;
    mainNode         xmldom.DOMNode;
    headerElem      xmldom.DOMElement; Pls could anyone tell what do these xmldom.DOMDocument, xmldom.DOMNode and xmldom.DOMElement mean?
    Later in the procedure, these variables are assigned values like
    doc      := xmldom.newDOMDocument;
    mainNode := xmldom.makenode(doc); This went a bouncer on me.
    Pls help.
    Thanks in advance ...!

    You can check this one -- Learned this from michael.
    satyaki>
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    satyaki>
    satyaki>
    satyaki>with person_h
      2  as
      3    (
      4      select 1 id, 'M' gender, 'W' race, '170' weight from dual union all
      5      select 1, 'M', 'W', '170' from dual union all
      6      select 1, 'M', 'W', '180' from dual union all
      7      select 1, 'M', NULL, '175' from dual union all
      8      select 1, NULL, 'W', NULL from dual
      9    )
    10    select xmlelement("Person",(
    11                                 select xmlagg(xmlelement("Sex", gender))
    12                                 from (
    13                                        select distinct gender
    14                                        from person_h
    15                                        where id = 1
    16                                        and gender is not null
    17                                      ) pg
    18                                ),
    19                                (
    20                                  select xmlagg(xmlforest(race as "Race"))
    21                                  from (
    22                                         select distinct race
    23                                         from person_h
    24                                         where id = 1
    25                                       ) pg
    26                                ),
    27                                (
    28                                  select xmlagg(xmlforest(weight as "Weight"))
    29                                  from (
    30                                         select distinct weight
    31                                         from person_h
    32                                         where id = 1
    33                                       ) pg
    34                                 )
    35                     ).getstringval() Res
    36    from dual;
    RES
    <Person><Sex>M</Sex><Race>W</Race><Weight>170</Weight><Weight>175</Weight><Weight>180</Weight></Person>
    satyaki>Regards.
    Satyaki De.

  • How to call shell script from a pl/sql procedure

    Hi all,
    I am little bit new to plsql programming, i have a small problem as follows
    I have to call a shell script from a pl/sql procedure ..
    Please suggest me some methods in oracle 10g, which i could make use of to achieve my goal. also please tell me what are the constraints for those methods if any.
    I already came across dbms_scheduler, but i have got a problem and its nor executing properly its exiting giving 255 error or saying that permission problem, but i have already given full access to my shell scripts.
    Thanks in advance
    Best Regards
    Satya

    Hi,
    Read this thread, perhaps is there your response :
    Host...
    Nicolas.

  • How to make a http request from a pl/sql procedure(URGENT)

    I need to make a http request from a pl/sql procedure, can any one tell me which built-in package and which procedure/function we serve my need?
    Thanks in advance.
    Ram Prasad.

    You should use UTL_HTTP package, but before it install the JVM into DB

  • Running a report from a pl/sql procedure

    I'm trying to execute a report from a oracle procedure using UTL_HTTP.request and I keep getting a 'User-Defined Exception' error. Can anyone see what I'm doing wrong or have any other suggestions what might be wrong? Using Reports6i and Oracle 8.1.7. When I run the report directly from the browser to the printer it runs perfectly.
    create or replace procedure p_test
    v_ret varchar2(4000);
    v_url varchar2(2000);
    begin
    v_url:= 'http://webserver:80/dev60cgi/rwcgi60?server=Rep-server-name+report=C:/report_loation.RDF+DESTYPE=printer+Desname=printer_name+userid=userid/password@db';
    v_ret := UTL_HTTP.request(v_url);
    end p_test;

    Cheryl, try replacing the ":" in your URL with the "escaped" version of the colon character instead: "%3a". (Thus your URL would read
    "...report=C%3a/report_location...".) Also, be sure that any other spaces in the URL are passed as either "+" or "%20".
    UTL_HTTP.request is much more sensitive to reserved characters on the URL than most browsers are (especially IE).
    - Bill

  • Execute CDC mappings from a PL/SQL procedure

    Hi,
    I´m using OWB 11.2.0.2 for Linux. I´ve created some CDC mappings to update cubes with changes coming from other tables and cubes (from the tables that implement those cubes with the relational option). The issues are:
    - The CDC mappings run successfully from the OWB (Project Navigator - Start), but I cannot execute them from a procedure in PL/SQL with the following code:
    PROCEDURE "PROC_RUNCDCMAPPINGS" IS
    --inicializar variables aquí
    RetVal NUMBER;
    P_ENV WB_RT_MAPAUDIT.WB_RT_NAME_VALUES;
    -- ventana principal
    BEGIN
    RetVal:= BARIK.CDC_LOAD_CUBO_RECARGA.MAIN(P_ENV);
    RetVal:= BARIK.CDC_LOAD_CUBO_TOR.MAIN(P_ENV);
    RetVal:= BARIK.CDC_LOAD_CUBO_TOAE.MAIN(P_ENV);
    RetVal:= BARIK.CDC_LOAD_CUBO_VIAJES.MAIN(P_ENV);
    RetVal:= BARIK.CDC_LOAD_CUBO_TICKETINCIDENCIA.MAIN(P_ENV);
    RetVal:= BARIK.CDC_LOAD_CUBO_LIQMONEDERO.MAIN(P_ENV);
    RetVal:= BARIK.CDC_LOAD_CUBOS_LIQTEMPORALES.MAIN(P_ENV);
    COMMIT;
    END;
    It doesn´t report any error (the value for RetVal after execution is 0), but the cubes are not loaded with changes, and the changes stored in the J$_%tables are not consumed.
    Some of the options that may impact in the mappings are:
    - All the CDC are of Simple type
    - There are more than one subscriber to consume the changes, as for some tables, its changes must feed more than one CDC.
    - All the mappings include only one execution unit per mapping.
    - The integration/load template is the default: DEFAULT_ORACLE_TARGET_CT
    Other question is: As I explained, I need more than one subscriber because same updates must be consumed by different CDC mappings, to load different cubes, but I´ve not been able to assign the subscribers to only the tables associated with them, so all the subscribers are subscribed to all the changes in all the CDC tables, but as many of those subscribers never consume the changes of same tables, in the J$_% tables remains the not consumed records, and I haven´t found the way to purge those tables (other than the delete from J$_), nor to assign the tables with the subscribers (so the subscribers are only subscribed to their interested changes, that will be consumed, so the tables will be emptied after the consumption).
    Any help with these problems will be greatly appreciated.
    Tell me if more info is needed to clarify the situation.
    Best regards,
    Ana

    Hi David,
    Thank you for your reply.
    These mappings are the mappings needed to update the cubes with the changes detected by the CDC system, they are located under the Mapping Templates folder and I´m using code templates for the control of the loading and the integration (the DEFAULT_ORACLE_TARGET_CT) mapping.
    What I need is to execute these mappings within a PL/SQL procedure that will be invoked from different tools.
    I´ve done it for regular mappings (not CDC mappings), and it works. The code is the same as for the CDC ones:
    PROCEDURE "PROC_RUNLOADMAPPINGS" IS
    --inicializar variables aquí
    RetVal NUMBER;
    P_ENV WB_RT_MAPAUDIT.WB_RT_NAME_VALUES;
    -- ventana principal
    BEGIN
    RetVal:= BARIK.LOAD_CUBO_RECARGA.MAIN(P_ENV);
    RetVal:= BARIK.LOAD_CUBO_TOR.MAIN(P_ENV);
    RetVal:= BARIK.LOAD_CUBO_TOAE.MAIN(P_ENV);
    RetVal:= BARIK.LOAD_CUBO_VIAJES.MAIN(P_ENV);
    RetVal:= BARIK.LOAD_CUBO_TICKETINCIDENCIA.MAIN(P_ENV);
    COMMIT;
    END;
    -- End of PROC_RUNLOADMAPPINGS;
    ,and when I run it, the mappings are executed, but with the CDC ones it doesn´t (even when no error is reported).
    I know that they are deployed in the selected agent (in my case the Default_Agent), but when I start them from the OWB, the mapping packages are created in the DB schema, so, I thought that maybe I could invoke them....so what you tell me is that the only way to invoke them is from SQL*Plus? not from a regular PL/SQL procedure?
    Thank you very much,
    Ana

  • Get the report list in a PL/SQL procedure

    Hi to all,
    I need to get the list of the personal report of a specified user in a PL/SQL procedure, is this possible?
    My procedure should delete not "standard" report of a specified portal user.
    Then i must have the list of all user's reports and after do my delete logic.
    Jhon Dhon

    Jhon -
    It sounds to me that what you want to do is have a list that is generated based upon the identification of an individual. You can do this a number of ways, but I think you would want to write a straight query to accomplish this rather than a PL/SQL procedure. A query to accomplish what you're looking to do would look something like this:
    SELECT
    person_name,
    person_id_number,
    other info you need to see in the output
    FROM
    table_name (that contains the info you need to see)
    WHERE
    conditional clauses to obtain only data you wish to see
    AND :p_person_id = table_name.person_id_number
    The AND clause line will return the employee the user wishes to see based upon that person's ID number. This information is asked for in a parameter form before the report is run. The :p_person_id is referred to as a bind variable. You can read more about this on Metalink or OTN.
    HTH,
    Steve

  • How to enable MSDOS program to be called from Oracle PL/SQL procedure ( Web Service )?

    Hello,
    Dealing with the time demanding procedure where power user is interactively execute sequence
    of steps of procedure:
    1. pl/sql procedure for preparing data in some table
    2. java program that read data from the table and creating input txt file for MSDOS program
    3. MSDOS program is autonomous component that reads input txt file and make
        output txtfile.
        MSDOS program is closed component, can not be modified
    4. java program that insert txtfile into Oracle table.
    5. Steps 1 to 4 are executed in interations driven with select on some table.
    Trying to prepare re-design the procedure  and not sure about which technologies to use ?
    The goal is that whole procedure would be implemented in pl/sql procedure and this way could be executed
    so as from power user from command line as from controlled application on any type of the client.
    So if that MSDOS program would be transformed as Web Service offered on  some MSWin server in the intranet.
    Then PL/SQL procedure would communicate ( call this web service ) and do all the job and at the end
    send status of completion and report through e-mail to the issuer of the procedure?
    Not sure what technologies should I use on Oracle RDBMS server on Linux to communicate with MSWin Web service which is running MSDOS program ?

    > Hi TOM,
    This is not asktom.oracle.com.
    > Can Possible to do in Oacle Pl/Sql...?
    Yes it can be done. Simply consult the applicable manuals that contains all of the details on how to do it. The manuals are:
    - Oracle® Database Application Developer's Guide - Large Objects (refer to Chapter 6 section on Using PL/SQL (DBMS_LOB Package) to Work with LOBs)
    - Oracle® Database PL/SQL Packages and Types Reference (refer to the chapter on DBMS_LOB)

  • Crystal report run from ASP code significantly slower than when run in CRS

    We have CRS XI R2.  I developed a report that contains several on-demand sub-reports.  The report and sub-reports are very fast when run directly from CRS.  However, when I run from ASP (users run a link from the intranet), it takes 4 times longer (1 second on CRS, vs. 5-10 seconds on intranet).  The report takes longer, bringing up a sub-report takes longer and paging through sub-reports take longer.  What can be done to improve the speed of the report that is using the ASP code?  I used a sample program provided at this support site to develop the report and it is pretty basic code.  The only time I have a problem is when I have many sub-reports.  Since they are on-demand, I do not know why this would matter.

    This has been created as an incident with SAP support.  Things that you will want to check is making sure that you handle the postback to the code as you do not need to run your entire code on every postback.  This will help performance after the original load. 
    One other thing is to compare performance with the viewer within Infoview that uses the same backend server as your application, ie PSReportFactory uses the page server, so you'll want to test with the DHTML viewer.  RAS code (reportclientdocument) uses the Report Application Server so you will want to test with the Advanced DHTML viewer.

  • 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.

  • Odd error when 6i report run from server but not from pc

    Getting error:
    REP-0065: Virtual Memory System error. REP-0200: Cannot allocate enough memory. cavaa 22
    running a report from the web server via URL / cgicmd.dat file
    report runs fine from developer tool, naturally
    both windows boxes, server & pc
    report has single ref cursor query from pacakged procedure returning 4 column record type, all defined in same package
    order of columns all appear to be the same, datatypes too
    ideas?

    Another developer created a new function that my ref cursor query used.
    It had an error, thereby causing the ref cursor to fail.... the report failed.
    I think more error handlers are necessary.

  • Obtaining HTML page by issuing a call from a PL/SQL procedure

    Is there any possibility to obtain HTMLDB -> HTML page from a user defined PL/SQL procedure ?
    For example I build an procedure which calls directly
    flows_010500.wwv_flow.show(null,p_flow_step_id=>'2',p_flow_id=>'104')
    and i try to read the result from htp.showpage, but I get a html response page with a security error.
    Maybe is necessary to initialize other parameters?
    Any help?

    Scott, I have got two pages in an application one is login page the other is welcome page. my login page will be process by store proceduer to validate the user based on users table that I have created on my schema. If the user login with username and password, if they exist on this table I will like to send them to welcome page. but I get http://htmldb.oracle.com/pls/otn/wwv_flow.accept.
    The page cannot be found
    The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
    Please try the following:
    If you typed the page address in the Address bar, make sure that it is spelled correctly.
    Open the htmldb.oracle.com home page, and then look for links to the information you want.
    Click the Back button to try another link.
    Click Search to look for information on the Internet.
    HTTP 404 - File not found
    Internet Explorer
    the procedure is below:
    CREATE OR REPLACE PROCEDURE obj_pls_login_chk(p_UserName IN varchar2
    ,p_Password IN varchar2
    ,Login IN varchar2 ) IS
    l_usr_id number;
    l_url varchar2(2000);
    BEGIN
    l_url := 'http://htmldb.oracle.com/pls/otn/f?';
    select user_id into l_usr_id
    from s_cdm_users
    where upper(username) = upper(p_UserName)
    and upper(Password) = upper(p_Password);
    if l_usr_id is not null then
    l_url := l_url||'p=29921:2:4413779570974471450';
    --wwv_flow.show(null,p_flow_step_id=>'29921',p_flow_id=>'29921:2');
    --htp.print(p_UserName);
    end if;
    EXCEPTION
    when others then
    return;
    END

  • Call an applications 'user exit' from a PL/SQL procedure

    My question is a technical PL/SQL question related to Oracle Applications. I need to call a standard applications 'user exit' from a stored PL/SQL procedure. Can anyone tell me if this is possible and how to do it?
    (i.e. I am attempting to call the AR user exit SALESTAX)
    Thanks,
    Michelle Dodge

    Hi,
    Read this thread, perhaps is there your response :
    Host...
    Nicolas.

Maybe you are looking for

  • Did You Know You Can Change Your Inbox Layout?

    Verizon Message Center  uses  can now choose the layout of their inbox. It can be Classic Layout with a simple list of your emails. You just need to double click an email to read it in a full screen. Or it can be Preview Bottom layout with a list of

  • How to assgin parameters to the rule standard rule 21000056 in workflow.

    Hi, I am trying to test the standard Workflow for payment approval and reversal documents in FICA. where I am using two standard workflow WS21000093 and 21000089 for Document change and Document reversal. For these Two workfows are using the same rul

  • There's a new Pro App Update...

    But it may be only for Final Cut users. I can't tell. You can find it Here. Have a nice day! X

  • Hdmi sound works with TV, not receiver (works fine in windows/ubuntu)

    Hi everyone, I've been pulling my hair out for about 8 hours now, finally decided to post. I have my htpc connected to a new pioneer sc-65 receiver and cannot get any sound working via hdmi at all. To make sure it wasn't a hardware problem i've teste

  • UseBean tag gives error please help

    Hi, I keep getting an error in my browser regarding the java.util.Collection class I am including in my jsp page. <%@ page import="java.util.*, src.com.database.*, src.com.data.*, src.com.business.*" %> <jsp:useBean id="persons" scope="request" class