Report through Pl/Sql

hi,
i need to generate a report through pl/sql without using the concept of spool...
please suggest some ideas
thanks in advance
Lovely

UTL_FILE Demos
http://psoug.org/reference/utl_file.html
Etbin's link also have many useful examples

Similar Messages

  • Calling Report Through PL/SQL

    Hi All,
    Is it possible to call a report through PL/SQL?If yes, please help me in this regard.
    Thanks.
    Vinay Kumar Garg

    Hi,
    There are 4 ways to call a report.
    Check out the following:
    http://oracleapps4u.blogspot.com/2011/03/oracle-report-request-methods.html

  • Can we schedule BI publisher report through pl/sql?

    Hi,
    If any new user is created and given "schedule report" privilege,
    instead of logging to bipublisher portal with the user's id and scheduling individual report I want to have a pl/sql package which when fired, if finds any new user should run those reports and save output for the user.
    For these I should call the bipublisher report in pl/sql through scheduler schema, set parameter values, provide run_interval, output_format etc.
    Please let me know if this is possible and also give example code.
    This is urgent requirement. Please reply ASAP.
    Thanks and Regards.

    Hi,
    am also having same requriment, if u did plz guide me.
    Thanks.

  • Calling reports through pl/sql

    I want to call reports(report is build into oracle reports 6i) through oracle database procedure.
    oracle database version 10 and developer 6i.
    any help??
    thanx in advance

    Hi,
    There are 4 ways to call a report.
    Check out the following:
    http://oracleapps4u.blogspot.com/2011/03/oracle-report-request-methods.html

  • Determining the parameters passed in a Discoverer Report through SQL query

    Hi,
    I want to know the parameters passed in a Discoverer Report through a SQL query.
    i.e if we pass the Report name (Workbook Name) then we get the paramaters used .
    Is there any way we can do this.
    Any help will be really appreciated.
    Thanx in advance
    Ankur

    Hi
    You can indeed get the parameters from the EUL5_QPP_STATS table, although they are extremely difficult to get at.
    Look at this script:
    SELECT
    QS.QS_DOC_OWNER    USER_NAME,
    QS.QS_DOC_NAME     WORKBOOK,
    QS.QS_DOC_DETAILS  WORKSHEET,
    TRUNC(QS.QS_CREATED_DATE) DOC_DATE,
    *(LENGTH(TO_CHAR(EUL5_GET_ITEM_NAME(QS.QS_ID)))+1)/9 ITEMS,*
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),1,  6)) ITEM1,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),10, 6)) ITEM2,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),19, 6)) ITEM3,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),28, 6)) ITEM4,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),37, 6)) ITEM5,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),46, 6)) ITEM6,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),55, 6)) ITEM7,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),64, 6)) ITEM8,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),73, 6)) ITEM9,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),82, 6)) ITEM10,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),91, 6)) ITEM11,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),100,6)) ITEM12,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),109,6)) ITEM13,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),118,6)) ITEM14,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),127,6)) ITEM15,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),136,6)) ITEM16,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),145,6)) ITEM17,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),154,6)) ITEM18,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),163,6)) ITEM19,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),172,6)) ITEM20
    FROM
    EUL5_QPP_STATS QS--,
    --   APPS.FND_USER          USR
    WHERE
    --   QS.QS_DOC_OWNER = '#' || USR.USER_ID AND
    *(LENGTH(TO_CHAR(EUL5_GET_ITEM_NAME(QS.QS_ID)))+1)/9 < 21*
    AND QS.QS_CREATED_DATE > '01-JAN-2007'
    What this does is return the first 20 items used in a worksheet. It does this by passing 6 characters at a time out of a cusror made up by concatenating QS_DBMP0 to QS_DBMP7 to get the Dimensions and then again by concatenating QS_MBMP0 to QS_MBMP7 to get the Measures. Having got that cursor it then takes each 6 characters and passes them to a nibble algorithm to decode the actual item. The code is extremely difficult to follow.
    I mention this because other fields in the same table are QS_JBMP0 to QS_JBMP7 which I believe are Joins, and QS_FBMP0 to QS_FBMP7 which look like Filters (aka parameters) being used. I think the QS stands for Query Statistics and BMP for bitmap. Somewhere in the EUL5.SQL script is the key to unlocking this.
    Good luck. The reason I say this will become apparent when you look inside EUL5.SQL.
    Best wsihes
    Mcihael

  • Urgent--- is there any way we can schedule report via PL/SQL

    I have an urgent requirement where I need to schedule report through PL/SQL. Can somebody provide me sample code which I can use. your help is really appreciated. You can also provide me the JAVA code if not possible through PL/SQL.

    check this it may help
    http://bipconsulting.blogspot.ru/2010/04/how-to-use-bi-publisher-web-service.html
    http://nerdsofobiee.wordpress.com/2010/01/12/bi-publisher-accessing-reports-using-url/

  • XML Publisher reports through OAF in R12

    Every time I submit a concurrent request I am unable to put a layout and thus no report is generated. If I run the report through forms there are no issues and everything works great. If I run it through OAF the layout never gets added to the request. All of the previous threads deal with versions of Oracle earlier than what I'm working with.
    Here are the details when ran through OAF: http://i.imgur.com/bBYOe.png
    Here are the details when ran through forms: http://i.imgur.com/1gfEt.png
    Here's my current code:
    This is in the AM.  public int submitCPRequest() {
        try
        OADBTransaction tx = (OADBTransaction)getDBTransaction();
        java.sql.Connection pConncection = tx.getJdbcConnection();
        ConcurrentRequest cr = new ConcurrentRequest(pConncection);
        String applnName = new String("UNIApps"); //Application that contains the concurrent program
        String cpName = new String("UNIA_OAF_XML_TEST"); //Concurrent program name
        String cpDesc = new String("");
        String time = new String("");
        // Pass the Arguments using vector
        Vector cpArgs = new Vector();
        // Calling the Concurrent Program
        cr.addLayout(applnName,cpName,"en","US","PDF","AMERICAN");
        //cr.addLayout(applnName,cpName,"en","US","PDF",null);
        int requestId = cr.submitRequest(applnName, cpName, cpDesc, time, false, cpArgs);
        tx.commit();
        return requestId;
        }catch(Exception e)
        OAException oe = new OAException(e.getMessage());
        oe.setApplicationModule(this);
        throw oe;
        }This is in the CO.  public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
        super.processFormRequest(pageContext, webBean);
        OAApplicationModule am = pageContext.getApplicationModule(webBean);
        if (pageContext.getParameter("report") != null)
           String requestId = am.invokeMethod("submitCPRequest").toString();
           //requestId = "27546040";
           Serializable params[] = {
               requestId
           pageContext.getApplicationModule(webBean).invokeMethod("getOutputURL", params);
           String outputURL = (String)pageContext.getTransactionValue("OutputURL");
           try
               pageContext.sendRedirect(outputURL);
               return;
           catch(Exception exception)
               throw new OAException(exception.getMessage());
       }

    thank u . the code useful for me

  • Submitting XML Publisher Concurrent Program through PL/SQL

    Hi,
    I am trying to submit a XML Publisher concurrent program through PL/SQL API fnd_request.submit_request.
    The request gets fired and completes successfully but it doesn't pick up the default template attached to it. Its output is plain XML but expected output is PDF report.
    However when I submit this report from SRS, it picks up the default template and gives output in PDF.
    Please let me know what could be going wrong?
    Regards,
    Nitin

    Check out the FND_REQUEST.ADD_LAYOUT API. You need to call it before you submit your report.
    Cheers,
    Dave

  • Altering schema of tables/objects inside a crystal report through API

    hi all,
            We run crystal reports through a Java application (using CR4E API) connecting to Oracle database. All the tables/views within the report do not use fully qualified names (i.e. schemaName.objectName) instead they use the object name alone. Earlier we would run all the reports logging in as the schema owner and hence all the objects would be accessible without issue. Per a new requirement we now log in as a non-schema owner ID and the objects are now not accessible to this user id unless a fully qualified object is not provided as the default context schema will now be different.
           We tried altering the schema through the API like so,
            ITable origTable = null;
            ITable newTable = null;
            String DB_USER_NAME = username;
            String DB_PASSWORD = password;
            String TRUSTED_CONNECTION = "true";
            String SERVER_TYPE = "JDBC (JNDI)";
            String USE_JDBC = "true";
            String DATABASE_DLL = "crdb_jdbc.dll";
            String JNDI_DATASOURCE_NAME = jndiName;
            String CONNECTION_URL = connectionURL;
            String DATABASE_CLASS_NAME = driverName;
    Tables tables = clientDoc.getDatabaseController().getDatabase().getTables();
                for(int i = 0;i < tables.size();i++){
                    origTable = tables.getTable(i);
                    if (tableName == null || origTable.getName().equals(tableName)) {
                        newTable = (ITable)origTable.clone(true);
                    newTable.setQualifiedName("TestSchema." + origTable.getAlias());    <--- Set actual schema here but it still takes the alias as "command"
    Are we doing anything wrong here? It appears that the table name is always "command", internally I think CR uses the name command for its table and we are not allowed to change it. The table name, alias and qualifier name are be default set to "command" by CR. If I append schema name to the table name I get schemaName.command as against schemaName.objectName.
    Synyonyms are not an option for us for various reasons. We will not be able to go down that road no matter what. However we are looking at an API related solution here so if anyone could advise in this regard it would be very helpful.

    Lindell - your response was very helpful.  I was able to create a SQL Command on the subreport and change the subreport links on the main report to use the paramters in the SQL Command.  The report is now very fast - even when there are lots of detail records on the main report.  It is properly executing the query and not reading all 2M records into memory for each subreport.
    I'm still totally confused as to why Crystal was misbehaving so poorly and changing how the subreport queried the database when the only change was the fields used for record selection on the main report.  It really looks like a bug to me, but maybe someone can still enlighten me.
    thanks again so much.  We are in Parallel testing for a production rollout - and the users are MUCH happier now!  (which of course makes me much happier!)
    Susan
    PS I was not aware of the SQL Command - had never used it before.  Took me a little while to figure it out and how to do the linking - but it is very powerful.  Thanks again.

  • Reporting on PL/SQL module dependencies

    Hi,
    I've just reverse-engineered a database into Designer 10g. The database contains 30+ packages and assorted other stored PL/SQL code modules (functions, procedures & triggers). I have used the Dependency Manager to build a list of dependencies for each code module, so now I can browse through each procedure/function and see which modules are called.
    I would like to be able to generate a paper report of all the PL/SQL module depoendencies. Something on the lines of :
    Package Name
    ....Procedure1
    ........Calls proc2
    ........Calls func3
    ........Calls package.proc4
    ....Function1
    ........Calls ...
    Does anyone know a way to generate such a report of PL/SQL module dependencies from within Designer?
    Thanks in advance
    Steve.

    You can get some of what you want with the Module Network report (cdmodnet) found under Module Design in the Repository Reports. Make the Module Sub-type "PL/SQL Definition". But if this doesn't do what you want, you may need to write your own report. This report would be a good starting place, and the Repository Reports tool gives you a way to copy an existing report to write a new one. Look at the queries, and that will tell you which API views to query and how to join them.

  • To fetch 2 fileds of table TRFCQIN (abap schema table ) through OPEN SQL

    Hi Experts,
    My basis team wants me to write a OPEN sql statement in DB2 . T
    The Open SQL statement for reading data from database tables is:
    SELECT      <result>
      INTO      <target>
      FROM      <source>
      [WHERE    <condition>]
      [GROUP BY <fields>]
      [HAVING   <cond>]
      [ORDER BY <fields>].
    I want to fetch 2 fileds of table TRFCQIN (abap schema table ) through OPEN SQL in report RSORADJV  in PI .
    As per PI basis comment : To use u201CRSORADJVu201D you need write the code in open SQL. If the code had been written in open SQL in the first place you wouldnu2019t be having to translate this from MS SQL.
    Can you pls help in writing open sql with above syntax .
    Initially when I wrote as
    QL statement : select * from SAPDBSR3.XI_AF_MSG, I got the error messege as
    Error : insufficient priviliage to access specified  table.
    Again basis suggested to write this code in OPen SQL statement .
    Please suggest., I dont know open SQL for the same.
    Regards,
    Arnab.

    Hi,
    Well I don't know why you have duplicates, this is a functionnal issue. But you get the dump due the the message number 864 that triggers the abend... Changing the message type to 'E', 'S' or 'I' will prevent the dump but I guess this message has a good reason to be
    Kr,
    Manu.

  • BIP 11g scheduler web service through pl/sql

    Hi,
         I am trying to schedule a BIP 11g report through a pl/sql wrapper. I  am running the same and not getting any response. I only get the following error :
    anonymous block completed
    status code: 500
    reason phrase: Internal Server Error.
    I am attaching the code piece. It would be nice if someone can guide me as to where the code is going wrong.
    set serveroutput on;
    Declare
    P_DATA_TYPE VARCHAR2(4000);
    p_data_in varchar2(5000);
    REQ UTL_HTTP.REQ;
    RESP UTL_HTTP.RESP;
    BEGIN
    p_data_in :=
    '<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:v2="http://xmlns.oracle.com/oxp/service/v2">
    <soapenv:Body>
    <v2:scheduleReport>
    <v2:scheduleRequest>
    <v2:deliveryChannels>
    <v2:EMailDeliveryOption>
    <v2:emailFrom>******</v2:emailFrom>
    <v2:emailServerName>******</v2:emailServerName>
    <v2:emailSubject>Test BIP webservice</v2:emailSubject>
    <v2:emailTo>******</v2:emailTo>
    </v2:EMailDeliveryOption>
    </v2:deliveryChannels>
    <v2:reportRequest>
    <v2:attributeFormat>pdf</v2:attributeFormat>
    <v2:reportAbsolutePath>/General Ledger/Reports/****** YYY ZZZ.xdo</v2:reportAbsolutePath>
    </v2:reportRequest>
    <v2:userJobName>BIPTESTWS</v2:userJobName>
    </v2:scheduleRequest>
    <v2:userID>******</v2:userID>
    <v2:password>******</v2:password>
    </v2:scheduleReport>
    </soapenv:Body>
    </soapenv:Envelope>';
    REQ := UTL_HTTP.BEGIN_REQUEST('http://XXXX:7001/xmlpserver/services/v2/ScheduleService?wsdl', 'POST','HTTP/1.1');
    utl_http.set_header(req, 'content-type', 'text/xml');
    UTL_HTTP.SET_HEADER(REQ, 'content-length', LENGTH(P_DATA_IN));
    utl_http.set_header(req, 'SOAPAction', '');
    utl_http.write_text(req, p_data_in);
    resp := utl_http.get_response(req);
    dbms_output.put_line ('status code: ' || resp.status_code);
    dbms_output.put_line ('reason phrase: ' || resp.reason_phrase);
    utl_http.end_response(resp);
    EXCEPTION
    WHEN utl_http.end_of_body THEN
    UTL_HTTP.END_RESPONSE(RESP);
    END;

    Hi,
        IS there anyone who has previously worked on the webservices and can help me a bit.

  • Crystal reports integration with sql server and visual studio 2010

    when I am trying to open a crystal report  through code ( visual basic 2010 ) I get the error
    the report has no tables
    I am using SQL SERVER 2008 R2
    HERE IS THE CODE I WROTE 
    Imports System.Data
    Imports System.Data.OleDb
    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.Windows.Forms
    Imports CrystalDecisions.Shared
    Public Class frmRep
        Dim objConnection As New OleDbConnection("Provider=SQLOLEDB;Data Source=ASHRAF-PC\SQLEXPRESS;Integrated Security=SSPI;Initial Catalog=TEST")
        Dim objDataAdapter As New OleDbDataAdapter()
        Dim objDataSet As New DataSet()
        Private Sub CrystalReportViewer1_Load(sender As System.Object, e As System.EventArgs) Handles CrystalReportViewer1.Load
        End Sub
        Private Sub frmRep_Load(sender As Object, e As System.EventArgs) Handles Me.Load
            Dim cr As New ReportDocument
            objDataAdapter.SelectCommand = New OleDbCommand()
            objDataAdapter.SelectCommand.Connection = objConnection
            objDataAdapter.SelectCommand.CommandType = CommandType.Text
            objDataAdapter.SelectCommand.CommandText = "select * from bands"
            objConnection.Open()
            objDataAdapter.Fill(objDataSet, "bands")
            objConnection.Close()
            cr.Load("D:\MY VB 2010 PROJECTS\test2\test2\CrystalReport1.rpt")
            cr.SetDataSource(objDataSet.Tables("bands"))
            CrystalReportViewer1.ReportSource = cr
            CrystalReportViewer1.Refresh()
        End Sub
    End Class

    I suggest you post that question in a Crystal Reports forum.
    Markus

  • Error message when executing a report through a VB application

    Hello,
    I have a problem when I want to launch a Crystal Report 10 report in a Visual Basic application.
    I created a report using "Add a command" to add a SQL query to this report, the report is working well when I launch it in Crystal Report. But when I launch it in the application I get an error message "The table 'Command' could not be found".
    (Other reports are working in VB when I create a report whitout the sql command tool)
    How can I do to make this working through VB ?
    This application uses a sql server 2005 database.
    Thank's in advance for your help,
    Régis

    Thank's for your answer, yes I'm connecting through an ODBC connection, yes the VB app is running the same odbc entry.
    When I have only a "normal" link to a table the report is working well, the problem is that when I add a sql command in this report, the VB application thinks it's a "normal" sql table and it gives me the error message. The VB application didn't recognize that the table command in the report is a sql request. I don't know what's the difference between executing this report directly in CR or in the VB application, the report didn't react in the same way even if the ODBC entry is the same.
    I don't know if what I try to do is possible, is it possible to execute a CR report with a sql command in a VB application ?
    FI : I found yesterday the way to create the same report without a sql command, its working in the VB app. But it would be great if I could solve this problem because it's much more easier to create a report giving only the sql request and not to do that manually in the report (attaching all the tables, making the group by, sort...).

  • How can i remove paramter form at runtime of report through PSP

    I am working on PSP (PL/SQL Server pages) with html code. I made some reports through report builder (rdf files). I pass variables into report parameter through PSP and I call the reports through this code
    OWA_UTIL.redirect_url (
    p_report_url
    || '?runp=&report=WEB_BOOK_LOCATION.rdf&destype=cache&desformat=htmlcss&server=rep60_kmas&userid='
    || p_usrcon||'&p_inst_id='||p_inst_id
    but I dont want parameter form on runtime . I know the code which is used only in developer forms , this is
    add_parameter (pl_id, 'PARAMFORM', text_parameter, 'NO');
    How can I remove parameter form on runtime from PSP.
    Thanks and regards
    --Anwar

    Would adding &paramform=NO to the call solve the problem?
    I am working on PSP (PL/SQL Server pages) with html code. I made some reports through report builder (rdf files). I pass variables into report parameter through PSP and I call the reports through this code
    OWA_UTIL.redirect_url (
    p_report_url
    || '?runp=&report=WEB_BOOK_LOCATION.rdf&destype=cache&desformat=htmlcss&server=rep60_kmas&userid='
    || p_usrcon||'&p_inst_id='||p_inst_id
    but I dont want parameter form on runtime . I know the code which is used only in developer forms , this is
    add_parameter (pl_id, 'PARAMFORM', text_parameter, 'NO');
    How can I remove parameter form on runtime from PSP.
    Thanks and regards
    --Anwar                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             

Maybe you are looking for

  • Sale Order without Division

    Hi, I have an issue in prodution system, there is a sales order created in 2008 without division (I dont know how the system allowed), this sale order is created with reference to a contract, and the contrct is having division. And now users want to

  • The Web Dynpro Application 'WebUI' has expired,

    Hi experts, We are using Netweaver 7.01 portal , I have done some change to the portal for configuring idle timeout . Now currently we are not using that in portal ,so i removed all the configurations When i am using the all the other portal applicat

  • How do I get a menu bar at the top of the page?

    I upgraded to the latest version of Firefox this morning. I have no menu bar at the top of the page. I did the alt version and then went to help to download the extension like one of the pages said. There were no new extensions. == This happened == E

  • Use of Favicons FF3.6.13 on WinXP

    I have some bookmarks in the bookmarks toolbar (I do have the Smart Bookmarks Bar installed). When i start firefox, all the favicons show up as white plain icons. When I click on each favicon and the page loads, the favicons take the actual icon of t

  • Multiple and frequent crashes due to spellchecker

    Hi, Since the release of the last 2 version of the French dictionaries, I've been experiencing a LOT of crashes due to the spellchecker At first, I was using FF3 and I got so sick of it that I switched to Minefield: the problem is still there, unfort