Stored Procedure Result Sets in Reports 6.0

Please help.
I have successfully managed to write a PL/SQL procedure using
the EXEC_SQL package in the Oracle to retrieve the return set
from a SYBASE stored procedure (very similar to the example in
the HELP documentation).
I would like to incorporate this output into a report using the
Oracle Reports Server 6.0 but I am not sure how to do this. If
anyone has any clues as to how this can be accomplished (PL/SQL
tables, reference cursors, beads or ribbons [only kidding]) then
I would be most grateful.
Thank you.
Andrew.
null

Andrew McSherry (guest) wrote:
: Please help.
: I have successfully managed to write a PL/SQL procedure using
: the EXEC_SQL package in the Oracle to retrieve the return set
: from a SYBASE stored procedure (very similar to the example in
: the HELP documentation).
: I would like to incorporate this output into a report using the
: Oracle Reports Server 6.0 but I am not sure how to do this. If
: anyone has any clues as to how this can be accomplished (PL/SQL
: tables, reference cursors, beads or ribbons [only kidding])
then
: I would be most grateful.
: Thank you.
: Andrew.
I would like to suggest the following procedures:
1. Create a Oracle work table for the Result Set and
Modify your pl/sql to insert the result set into
Oracle work table.
2. Place your pl/sql procedure in Oracle Reports
Triggers (i.e. Before Report or After parameter
form)
3. Define the Data Model using the oracle work table in
Oracle Reports.
Peter Ng
null

Similar Messages

  • Actuate 7 PL/SQL Stored Procedure Call Before the Report Run.

    Hi,
    I need a small help to call a pl sql stored procedure in actuate 7.
    I wrote a code a on component content
    Function runProc(procName as String, connection As AcDBConnection )
    ' Insert your code here
    Dim statement As AcDBStatement
    Dim results as string
    ' Prepare statement
    Set statement = connection.Prepare("BEGIN " & procName & "; END;" )
    If statement Is Nothing Then
    results = "Failed to prepare statement."
    results = results & " " & connection.GetSpecificErrorText( )
    results = results & " " & connection.GetGeneralErrorText( )
    Exit sub
    End If
    ' Execute sprocoutparam
    If statement.Execute() = 0 Then
    results = "Stored procedure " & procName & "execution failed."
    results = results & " " & connection.GetSpecificErrorText( )
    results = results & " " & connection.GetGeneralErrorText( )
    Else
    results = "Stored procedure " & procName & " execution success."
    End if
    ShowFactoryStatus(results)
    End FunctionNow this Code I am calling on the Chart Start Method
    Sub Start( )
        Super::Start( )
        ' Insert your code here
        Dim ProcName as String
        Dim connectionObject As AcDBConnection
        ProcName="DELETECUSTOMER(1234)"
        runProc(ProcName, connectionObject )
    End SubNow when i Run the Report i get this Error !
    NewReportApp::Frame::Chart%Start(9): Invalid procedure reference. - (runProc)
    1 Semantic Error(s) found
    Thanks,
    Asif

    hi,
    Finally Figured Out Here....
    Steps to Call the Stored Procedure In Actuate 7
    1 – Right Click on Content – Frame and go to properties and method Tab.
         1 – Click on New Button to you create own custom method.
         2 – Write the following code :
    Sub runProc(procName as String, connection As AcDBConnection )
         Dim statement As AcDBStatement
         Dim results as string
         Set connection = GetConnection()
         'Prepare statement
         Set statement = connection.Prepare("BEGIN " & procName & "; END;" )
              If statement Is Nothing Then
                   results = "Failed to prepare statement."
                   results = results & " " & connection.GetSpecificErrorText( )
                   results = results & " " & connection.GetGeneralErrorText( )
                   MsgBox "Procedure Not Called....Badddddd"
                   Exit sub
              End If
         ' Execute sprocoutparam
              If statement.Execute() = 0 Then
                   results = "Stored procedure " & procName & "execution failed."
                   results = results & " " & connection.GetSpecificErrorText( )
                   results = results & " " & connection.GetGeneralErrorText( )
                   MsgBox "Procedure Not Called....Badddddd" & results
              Else
                   results = "Stored procedure " & procName & " execution success."
                   MsgBox "Procedure Called....Wowwww"
              End if
              ShowFactoryStatus(results)
    End Sub2 – Now let call the stored procedure before our actual report query runs.
         1 - Right Click on Content – Frame and go to properties and method Tab.
         2 - Select the Start Method and Click on Override button.     
         3 - Write the following code:
    Sub Start( )
         Dim ProcName as String
         Dim connectionObject As AcDBConnection
         Set connectionObject = GetConnection()
         ProcName="XXTEST ()"
         runProc( ProcName, connectionObject )
        Super::Start ( )
    End Sub3 – Now design your report as usual using the Textual Query window.

  • HOW TO GROUP ITEM BY department (MaNganh)/ Category(MaNhom) in XtraReport from Stored Procedure result ?

    I have stored procedure result, i have succeeded bind it to xtrareport. But how can I group item by department (MaNganh) and category (MaNhom) in XTRA REPORT ? Please help me how to solve it ! (SQL SERVER 2008 R2) (DevExpress 10.2.8)

    I've made ​​it, and successful.By add GroupField: 
    GroupField groupField = new GroupField("MaNhom");
               GroupHeader1.GroupFields.Add(groupField);
               tblCell_Group_MaNhom.DataBindings.Add("Text", DataSource, "MaNhom");
    Thank you for HELP! 
    Master Can

  • A problem when referring to a stored procedure in a crystal report

    Hi all,
    I've checked that when calling one stored-procedure within a crystal report, one sequence will be selected for 2 times. Thus 2 will be added to the corr. sequence No. And I've also directly ran such procedure in 'SQL/Plus' that follows, to make sure that actually the corr. sequence will be referenced by only once.
    SQL> execute p_rpT_FCL_col (:te, 'ZIMU00000537SJU',:GRP)
    PL/SQL procedure successfully completed.
    SQL> print :te
    TE
    17
    SQL> execute p_rpT_FCL_col (:te2, 'ZIMU00000537SJU',:GRP)
    PL/SQL procedure successfully completed.
    SQL> print :te2
    TE2
    18
    Bst Rgds,
    Edward

    Well, can you please post the details about your stored proc?
    <quote> I've checked that when calling one stored-procedure within a crystal report, one sequence will be selected for 2 times. Thus 2 will be added to the corr. sequence No.</quote>
    Question: What do you mean by that? How many times did you run the report?
    More details please.
    -Raj Suchak
    [email protected]

  • Stored Procedure With Multiple Result Sets As Report Source : Crosspost

    Hello Everyone,
    I have an issue where i have created a stored procedure that returns multiple result sets
    /* Input param = @SalesOrderID */
    SELECT * FROM Orders TB1
      INNER JOIN OrderDetails TB2 ON  TB1.ID = TB2.ID
    WHERE TB1.OrderID = @SalesOrderID
    SELECT * FROM Addresses
      WHERE Addresses.OrderID = @SalesOrderID AND Addresses.AddressType = 'Shipping'
    SELECT * FROM Addresses
      WHERE Addresses.OrderID = @SalesOrderID AND Addresses.AddressType = 'Billing'
    This is just a quick sample, the actual procedure is a lot more complex but this illustrates the theory.
    When I set the report source in Crystal X to the stored procedure it is only allowing me to add rows from the first result set.
    Is there any way to get around this issue?
    The reason that I would prefer to use a stored procedure to get all the data is simply performance. Without using one big stored procedure I would have to run at least 6 sub reports which is not acceptable because the number of sub reports could grow exponentially depending on the number of items for a particular sales order.
    Any ideas or input would be greatly appreciated.
    TIA
        - Adam
    P.S
    Sorry for the cross post, I originally posted this question [here|/community [original link is broken];
    but was informed that it might be the wrong forum
    Edited by: Adam Harris on Jul 30, 2008 9:44 PM

    Adam, apologies for the redirect, but it is better to have .NET posts in one place. That way anyone can search the forum for answers. (and I do not have the rights to move posts).
    Anyhow, as long as the report is created, you should be able to pass the datasets as:
    crReportDocument.Database.Tables(0).SetDataSource(dataSet.Tables("NAME_OF_TABLE"))
    Of course alternatively, (not sure if this is possible in your environment) you could create a multi-table ADO .NET dataset and pass that to the report.
    Ludek

  • Cannot refresh a stored procedure within a Crystal Report from Xcelsius

    Please help...Xcelsius 2008 & Live Office problem...
    What I am trying to do is to refresh a stored procedure that is within a Crystal report from within my Xcelsius dashboard in Preview mode. The data returned appears on the Xcelsius dashboard. It works fine in Design mode, just not in Preview or when published as a swf.
    1. I set up a Crystal Report using a Stored Procedure as the data provider.
    2. The Stored Procedure has a parameter built into it.
    3. When the report is refreshed within Crystal, the prompt dialog box is displayed; I fill in the desired value, and run. Everything comes back fine.
    4. Crystal Report is exported to the repository.
    5. In Excel, I inserted the Crystal Report using Live Office. It shows up as a Live Office object just fine.
    6. I bound an Excel cell to the prompt; when you change the value in the bound cell, the Live Office object refreshes and displays the correct results.
    7. In Xcelsius, I imported the Excel spreadsheet.
    8. I set up a Text component that is bound to the cell containing the parameter value. Also set up a Grid to display the results, and a Connection Refresh button to call the refresh. Added a Live Office Data Connection pointing to the Web Service URL for the report.
    Note: When in Designer mode, if the value of the bound cell is changed, the results in the grid change accordingly.
    9. When in Preview mode (or generated swf), if the Refresh button is pressed, a "User Identification" dialog box appears asking me to log on. The values it asks for are: System, User Name, Password, and Authentication. I enter the same credentials as are within the Live Office settings in Excel, (which are working correctly), but receive an error "soapenv:Server.generalException: Database logon failed.".
    Note - all the id's are synced up - Business Objects, Database, etc.
    I've tried all kinds of combinations, but nothing gets me past this error. If I use any other server than the one listed under System in Live Office, the error message is "soapenv:Server.generalException: Server XXXXX not found or server may be down".
    I've noticed that in Excel directly, when I open the spreadsheet and refresh the Live Office object, I am prompted to log on to the database where the stored procedure is being executed. This dialog box does not appear once the Excel sheet has been imported into Xcelsius. One of the combinations I tried in the "User Identification" dialog box was the name of the database server, that didn't work either.
    I also tried creating the Live Office object directly within the Excel spreadsheet in Xcelsius, but then I was unable to bind the prompt value. Could never get the Live Office/Properties menu to appear.
    Ideas? Thoughts?
    Thanks in advance!
    Stephanie

    This post looks like a duplicate of: Live Office: Database logon failed error

  • Can we query a stored procedure results as an SQL Table ?

    Hi,
    Can we query a results from the results of a stored procedure returning a result set either as cursors or as PL/SQL Table like what we do like this
    select * from <tablename>
    select * from (select * from tablename) alias. instead of this, can we do like this
    select * from (results of stored procedure) alias.
    Please Provide any Help.

    I agree. Pipelined Table Functions are the way to go.
    Docs at http://tahiti.oracle.com
    Working demos in Morgan's Library at www.psoug.org under Pipelined Table Functions.

  • How to display stored procedure results in SJSC table?

    I have been able to create a cached rowset and debug/watch the results, but do not understand how to transfer those results to a Table component. Can anyone point me in the right direction?
    Details:
    In SessionBean1.java, I declared the stored procedure and rowset along with get/set and update procedures:
    // SLS trying stored procedure 20060412
        private java.sql.CallableStatement spFXRatesStatement; 
        private CachedRowSetXImpl spFXRatesRowSet = new CachedRowSetXImpl();
        public CachedRowSetXImpl getSpFXRatesRowSet() {
            return spFXRatesRowSet;
        public void setSpFXRatesRowSet(CachedRowSetXImpl crsxi) {
            this.spFXRatesRowSet = crsxi;
        public void updateSpFXRatesRowSet(String inDate, String inCcy) {
            try {
                spFXRatesStatement.setString(1, inDate);
                spFXRatesStatement.setString(2, inCcy);
                spFXRatesRowSet.populate(spFXRatesStatement.executeQuery(), 1);
            catch (Exception e) {
                // TODO - write exception code
    // SLS trying stored procedure 20060412I then �prepared� the stored procedure within SessionBean1�s init() procedure:
    // SLS trying a stored proc 20060412
            try {
                javax.naming.Context ctx = new javax.naming.InitialContext();
                javax.sql.DataSource ds = (javax.sql.DataSource)ctx.lookup("java:comp/env/jdbc/bmo_fp");
                java.sql.Connection conn = ds.getConnection();
                // spGetFXRates
                spFXRatesStatement = conn.prepareCall("{call GetFXRates(?, ?)}",
                        java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE, java.sql.ResultSet.CONCUR_READ_ONLY);          
               // next sp...
                // clean up
                ctx.close();
                conn.close();
            catch (Exception e) {
                // TODO - add exception code
    // SLS 20060412 I can see the results in a web page procedure with a �getSessionBean1().getSpFXRatesRowSet().getString(i)� watch.
    try {
                getSessionBean1().updateSpFXRatesRowSet("9/30/2005","EUR");
                getSessionBean1().getSpFXRatesRowSet().first();
                while (getSessionBean1().getSpFXRatesRowSet().isLast() != true) {
                    getSessionBean1().getSpFXRatesRowSet().next();
            catch (Exception e) {
                // TODO - specify error detail
            }Now, how do I transfer these results to a table?

    I think you have to add a CachedRowSetDataProvider to you page been.
    Then initalize it with your getSpFXRatesRowSet() in the init() method.
    Then link you table to the CachedRowSetDataProvider.

  • Importing Stored procedures into pre-made report

    <p>Hello all,</p><p>i&#39;v got some trouble with some pre-made reports that we wish to start using with embedded java engine.</p><p>Reports are stored procedure based and the built-in connection is ODBC.</p><p>What I&#39;d like to do is to change the datasource to JDBC datasource and run all queryes through there. Is is possible with CR4E ? </p><p> </p><p>Best regards,</p><p>Henrix</p>

    Hi Henrix,
    This is possible, however there is a known issue with the Database Explorer that ships with CR4E in that Stored Procs are not displayed. You can check out the following forum thread if you want more information on this specific issue:
    *http://diamond.businessobjects.com/node/520*
    This issue generally affects creating new reports against Stored Procedures, but it will affect you as well as it will prevent you from using the UI to switch from one database driver to another, Primarily because the Stored Procs won't be displayed in the destination table that you wish to switch to.
    To get around this we will need to create a simple java routine to switch the tables via code. The attached code below will go through all of the tables in the main report and the subreport and assign the new JDBC connection information:
    package com.businessobjects.samples;
    import java.io.IOException;
    import com.crystaldecisions.sdk.occa.report.application.OpenReportOptions;
    import com.crystaldecisions.sdk.occa.report.application.ReportClientDocument;
    import com.crystaldecisions.sdk.occa.report.data.IConnectionInfo;
    import com.crystaldecisions.sdk.occa.report.data.ITable;
    import com.crystaldecisions.sdk.occa.report.data.Tables;
    import com.crystaldecisions.sdk.occa.report.lib.IStrings;
    import com.crystaldecisions.sdk.occa.report.lib.PropertyBag;
    import com.crystaldecisions.sdk.occa.report.lib.ReportSDKException;
    public class ChangeDatasource {
    Â Â Â /**
    Â Â Â * @param args
    Â Â Â * @throws ReportSDKException
    Â Â Â * @throws IOException
    Â Â Â */
    Â Â Â public static void main(String[] args) throws ReportSDKException, IOException {
    Â Â Â Â Â Â //change the next set of variables to match your requirements
    Â Â Â Â Â Â String connectionURL = "jdbc:derby:classpath:/Xtreme";
    Â Â Â Â Â Â String driverName = "org.apache.derby.jdbc.EmbeddedDriver";
    Â Â Â Â Â Â String DB_USER_NAME="bobj";
    Â Â Â Â Â Â String DB_PASSWORD = "bobj";
    Â Â Â Â Â Â String reportName = "MyODBCReport.rpt";
    Â Â Â Â Â Â
    Â Â Â Â Â Â //the next few variables should not need to be changed for JDBC connections
    Â Â Â Â Â Â String SERVER_TYPE = "JDBC (JNDI)";
    Â Â Â Â Â Â String USE_JDBC = "true";
    Â Â Â Â Â Â String DATABASE_DLL = "crdb_jdbc.dll";
    Â Â Â Â Â Â String CONNECTION_URL = connectionURL;
    Â Â Â Â Â Â String DATABASE_CLASS_NAME = driverName;
    Â Â Â Â Â Â
    Â Â Â Â Â Â ReportClientDocument clientDoc = new ReportClientDocument();
    Â Â Â Â Â Â clientDoc.setReportAppServer("inproc:jrc");
    Â Â Â Â Â Â
    Â Â Â Â Â Â // Open report
    Â Â Â Â Â Â clientDoc.open(reportName, OpenReportOptions._openAsReadOnly);
    Â Â Â Â Â Â
    Â Â Â Â Â Â PropertyBag propertyBag = null;
    Â Â Â Â Â Â IConnectionInfo connectionInfo = null;
    Â Â Â Â Â Â ITable origTable = null;
    Â Â Â Â Â Â ITable newTable = null;
    Â Â Â Â Â Â Tables tables = null;
    Â Â Â Â Â Â
    Â Â Â Â Â Â //this next routine iterates through all the tables in the main report
    Â Â Â Â Â Â //if you need to make specific changes to an individual table you can
    Â Â Â Â Â Â //evaluate the name of the current table and change the code accordingly
    Â Â Â Â Â Â tables = clientDoc.getDatabaseController().getDatabase().getTables();
            for(int i = 0;i < tables.size();i+){<br />            origTable = tables.getTable(i);<br />            newTable = (ITable)origTable.clone(true);<br />            newTable.setQualifiedName(origTable.getAlias());<br />            connectionInfo = newTable.getConnectionInfo();<br />            <br />            // Set new table connection property attributes<br />            propertyBag = new PropertyBag();<br /><br />            // Overwrite any existing properties with updated values<br />            propertyBag.put("Server Type", SERVER_TYPE);<br />            propertyBag.put("Use JDBC", USE_JDBC);<br />            propertyBag.put("Database DLL",DATABASE_DLL );<br />            propertyBag.put("Connection URL", CONNECTION_URL);<br />            propertyBag.put("Database Class Name", DATABASE_CLASS_NAME);<br />            connectionInfo.setAttributes(propertyBag);<br /><br />            connectionInfo.setUserName(DB_USER_NAME);<br />            connectionInfo.setPassword(DB_PASSWORD);<br /><br />            // Update the table information<br />            clientDoc.getDatabaseController().setTableLocation(origTable, newTable);            <br />        }<br />    <br />    // Next loop through all the subreports and pass in the same<br />    // information. You may consider creating a separate method which accepts different settings<br />        IStrings subNames = clientDoc.getSubreportController().getSubreportNames();<br />        for (int subNum=0;subNum<subNames.size();subNum) {<br />            tables = clientDoc.getSubreportController().getSubreport(subNames.getString(subNum)).getDatabaseController().getDatabase().getTables();<br />            for(int i = 0;i < tables.size();i+){
    Â Â Â Â Â Â Â Â Â Â Â Â origTable = tables.getTable(i);
    Â Â Â Â Â Â Â Â Â Â Â Â newTable = (ITable)origTable.clone(true);
    Â Â Â Â Â Â Â Â Â Â Â Â newTable.setQualifiedName(origTable.getAlias());
    Â Â Â Â Â Â Â Â Â Â Â Â connectionInfo = newTable.getConnectionInfo();
    Â Â Â Â Â Â Â Â Â Â Â Â // Set new table connection property attributes
    Â Â Â Â Â Â Â Â Â Â Â Â propertyBag = new PropertyBag();
    Â Â Â Â Â Â Â Â Â Â Â Â // Overwrite any existing properties with updated values
    Â Â Â Â Â Â Â Â Â Â Â Â propertyBag.put("Server Type", SERVER_TYPE);
    Â Â Â Â Â Â Â Â Â Â Â Â propertyBag.put("Use JDBC", USE_JDBC);
    Â Â Â Â Â
    Â Â Â Â Â Â Â propertyBag.put("Database DLL",DATABASE_DLL );
    Â Â Â Â Â Â Â Â Â Â Â Â propertyBag.put("Connection URL", CONNECTION_URL);
    Â Â Â Â Â Â Â Â Â Â Â Â propertyBag.put("Database Class Name", DATABASE_CLASS_NAME);
    Â Â Â Â Â Â Â Â Â Â Â Â connectionInfo.setAttributes(propertyBag);
    Â Â Â Â Â Â Â Â Â Â Â Â connectionInfo.setUserName(DB_USER_NAME);
    Â Â Â Â Â Â Â Â Â Â Â Â connectionInfo.setPassword(DB_PASSWORD);
    Â Â Â Â Â Â Â Â Â Â Â Â // Update the table information
    Â Â Â Â Â Â Â Â Â Â Â Â clientDoc.getSubreportController().getSubreport(subNames.getString(subNum)).getDatabaseController().setTableLocation(origTable, newTable);
    Â Â Â Â Â Â Â Â Â Â Â Â }
    Â Â Â Â Â Â Â Â Â }
    Â Â Â Â Â Â
    Â Â Â Â Â Â //save the report with the changes
    Â Â Â Â Â Â clientDoc.save();
    Â Â Â
    Â Â Â }
    Â Â Â
    Â This code is pretty generic, however you can modify it to be specific for each report if necessary.
    Regards,
    Sean Johnson (CR4E Product Manager)
    Rate this plugin @ Eclipse Plugin Central          </p>

  • How to list all tables/stored procedures used by the report

    All the reports i create are getting data from stored procedure(s). Is there a way to obtaining a listing of all the stored procedures without having to open report by report and check under Database > Set Datasource Location > Properties > Table Name?
    Finding this info it would be extremely valuable, as it would help me to judge the impact of any changes that i might be considering to one or more of the stored proc.
    So far i maintained a manual listing but it is not up-to-date and reliable. I would rather prefer to get an updated listing every time i want to change/drop a stored procedure.
    Thanks so much for your help.
    Rick

    Dell can you be a little bit more specific about the SDK solution. I could ask one of the developers to help me but i need to gather more details.
    I took a look .rpt inspector Pro but it does not do what i need. All i need is the the listing of all the database tables (in my case stored procs) used in my reports. No need to replace or change anything. I need to scan the directory where i have all the reports for the different applications and get report names and table/stored procs used. i can export the txt file to excel and that's all.

  • Stored Procedure Parameters - Setting a default value

    Using SQL 2005, 2008, 2012
    This should be easy, but think that I am making it hard. Below is the stored procedure that I want to call. If I want to pass a 'N' to @SearchDBsFlag how can I retain the default values for @DBName and @PreviewTextSize? I do not want to explicitly pass the
    NULL, 100. I want it to pick up the default values that are defined in the stored procedure.
    Create Procedure [dbo].[ifs_util_Find]
    @SearchText varchar(8000)
    , @DBName sysname = Null
    , @PreviewTextSize int = 100
    , @SearchDBsFlag char(1) = 'Y'
    , @SearchJobsFlag char(1) = 'Y'
    , @SearchSSISFlag char(1) = 'Y'

    I did look up "flag coupling" and all I found was posts from you.
    Start with http://en.wikipedia.org/wiki/Coupling_(computer_programming). The terminology varies; what I call "flag coupling" is one version of Content
    coupling. 
    Cohesion:
    This is how well a module does one and only one thing; that it is logically coherent. The modules should have strong cohesion. You ought to name the module in the format "<verb><object>", where the "<object>" is a specific logical unit in
    the data model. There are several types of cohesion. We rank them going from the worst form of cohesion to the best
    1) Coincidental 
    2) Logical
    3) Temporal
    4) Procedural
    5) Communicational
    6) Informational 
    7) Functional 
    Coupling:
    If modules have to be used in a certain order, then they are strongly coupled. If they can be executed independently of each other and put together like Lego blocks, then they are loosely or weakly coupled. There are several kinds of coupling, which are ranked
    from worse to best: 
    1) Content 
    2) Common 
    3) Control 
    4) Stamp 
    5) Data 
    This is covered briefly in a chapter on writing stored procedures in my book on SQL PROGRAMMING STYLE. In the meantime, you can read DeMarco, Yourdon, Constantine, Myers or several other of the pioneers. 
    This is FAR more basic than SQL programming. This is what you are supposed to know before you write any code in any language. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • What happens to the report if the underlying stored procedure to execute the report take atleast 3 hrs to run

    Hi,
    I have a report which is calling a stored procedure..
    Stored procedure exceutes 4-5 stored procedure and then returns the count each procedure it ran using union all statement... The stored procedure takes around 3-4 hrs to run because it is looking at quarterly data and YTD data.
    So once the report is kicked off and the procedure behind it runs and runs how will communicate to the report to show the final data... the final data will just be 5 rows with counts.
    I think we are running into a issue where the stored procedure runs and runs and then the report goes into la la land and has no clue what to do...
    Can you please shed some light on this..
    Thanks
    Karen

    Hi Karen,
    When we render a report, the report would process the following procedures:
    Open connections to data source and reading data rows from data extensions for all datasets, means retrieve data. Then process the engine requests, including the tablix, grouping, sorting, filtering, aggregations and subreport processing, means process report.
    Finally, render the report, including the pagination modules and on-demand expression evaluations.
    So the report rending has to wait until the stored procedure is executed. To improve the performance, we can consider the three aspects:
    Improve the performance of the stored procedures. Such as index and join. For better support, I suggest you can post a new thread about this issue in Transact-SQL forum at:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=transactsql. It is appropriate and more experts will assist you.
    Simplify the report. For example, avoid including a reference to [&TotalPages] or any complex expressions in the page header and page footer. For more details, please see the following document:
    http://technet.microsoft.com/en-us/library/bb522806(v=sql.105).aspx
    Using cashing if you have a long-running query that cannot be tuned further. For more details, please refer to the following article:
    http://msdn.microsoft.com/en-us/library/ms159241(v=sql.110).aspx
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Stored Procedure in Crysral Sub Reports

    Hi
    I am using Crystal XI with an ODBC connection to an Oracle database.
    We had a sub report that used a view as it's data source. We needed to change that report to use a stored procedure with an input parameter.
    When I changed the report to use the stored procedure as the data source, I never get prompted for the input parameter.
    To make sure the stored procedure worked, I created a new report, selected the stored procedure and got prompted for the parameter which then was under the parameter fields in the field explorer.
    Why doesn't that happen on the report I am trying to modify.
    Roseanne

    I have a parameter in the sub-links but it doesnt look like it passess anything to the stored procedure.
    This is why I was questioning why I dont get prompted for a paramter when I added the stored procedure as my data source.

  • Stored procedure embedded in cyrstal report vs universes

    Hi,
    I have .NEt application that is rendering reports from BOE. BOE has these crystal report stored in its repository. Currently I have the definition of the stored procedure on which to retrieve data for the report embedded in the crystal report template. Would like to know if it will be better to have a universe defined in CMC for the stored procedure and base the crystal report on the universe? Performance wise which option will be better.
    How to base a universe on the outcome of an oracle stored procedure?
    Thanks
    Kajal

    This question would be better asked in the crystal report design forum as the performance of the report in the designer will be generally the same performance you will see in your application.
    Unless you are intending on manipulating the data or adding some additional row level security, I would expect you are better off reporting directly off the stored procedure as the Universe would only be adding an additional layer where you are not using any additional functionality.

  • Getting the count of stored procedure results in SQL Developer

    Hello,
    I have a stored procedure in SQL Developer. I right-click and say run. An output window at the bottom displays my results. There's no field, however, that tells me how many results I got.
    There must be a way to figure this out (without modifying the SQL to include a count field). Is there?

    Hi Delaynomore,
    Please follow the step and suggestion in the below MSDN document to do the move to the new versionof SQL Server. 
    Use Upgrade Advisor to Prepare for Upgrades
    https://msdn.microsoft.com/en-us/library/ms144256(v=sql.110).aspx
    If there are still some errors when running the SP, you could use the SQL profiler trace to easily find which statement in the SP causes the error message. 
    How To: Use SQL Profiler
    https://msdn.microsoft.com/en-us/library/ff650699.aspx
    SQL Server Profiler Step by Step
    http://www.codeproject.com/Articles/21371/SQL-Server-Profiler-Step-by-Step
    Regards,
    Doris Ji

Maybe you are looking for

  • In Numbers, how can I save a filter sequence using Reorganize?

    I'm using Numbers (from iWorks 9) and have a filterning sequence that involves a date range and finding specific values in a text column.  It's pretty straightforward to use the Reorganize button, but my macro program (QuicKeys) can't seem to negotia

  • My iphone is being recognised by windows but not itunes

    , ive tried to restart the mobile service thing but it won't let me click stop or start! ive reinstalled itunes and got a message saying apple mobile device failed to start! arrgh! help please

  • Photoshop cs4 access denied when trying to install from disc in Windows 7 64bit.

    Photoshop cs4 access denied when trying to install from disc in Windows 7 64bit. I tried it in safe mode and it starts to install but get an error there as well. What do I do?

  • Authorizations with PNP and Get Pernr.

    We have just noticed an issue with how our custom reports are working in regards to authorizations.  Our users have authorization to see Basic Pay infotype information up to the point where an associate becomes an executive.  When running our reports

  • Data Type - Complex type

    Hi experts! I wonder if it's possible when creating a data type that the highest treelevel doesn't get Category "Complex Type". I want it to be an Element instead. Because the receiving system which is terradata can't read the message with start root