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.

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.

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

  • 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

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

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

  • 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

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

  • Requirements of SQL Server 2005 Stored Procedures to Develop Crystal Report

    Hi All,
       I want to learn how to create crystal report off of SQL Server 2005 Stored Procedure. So anybody please let me know from where I can download the documentation on "Requirements of SQL Server 2005 Stored Procedures for crystal report.
      I am using Crystal Report XI. Any help is greatly appreciated.
    Thank You.

    Hello,
    When CR uses Stored Porcedures we only look at the last SELECT statement. We can't use TMP tables because they are owned by the system and not the user. Even though you created them under your logon credentials you are not the actual owner. Or so I have found so far.... CR does not have permissions to get to those temp tables. If you can find out dynamically what the table names are called then it may work. I don't have a sample but it has the usual table info with a random GUID or temp name, really long, and changes every time.
    What should work is create a real table, not one of MS's tempTables and then push all your data to that table and then the last select statement returns all of your data from that temp table:
    SELECT * FROM MYTEMPTABLE.DBO.TABLE.
    Then CR should ahve no issues.
    It may be that the JDBC driver has problems. Test it using OLE DB or ODBC.
    Thanks again
    Don

  • Using stored procedures in master / detail report?

    hi all,
    i've created stored procedures for when inserting records into my tables.
    when using it in my master, i created a pl/sql process and just call out my procedure passing all the item values... how do i do this on the detail report?
    thanks
    allen

    hi,
    i'm back.. :)
    i attempted to use the following pl/sql code in a pl/sql process.
    begin
      for i in 1..apex_application.g_f01.count
      loop
        apc_user_pkg.update_user_role ( p_user_role_id     => apex_application.g_f02(i)
                                       ,p_start_on         => apex_application.g_f05(i)
                                       ,p_end_on           => apex_application.g_f06(i)
                                       ,x_last_updated_on  => apex_application.g_f09(i)
                                       ,x_last_updated_by  => apex_application.g_f10(i) );
      end loop;
    end;however, it doesn't seem to be working properly.. it doesn't update the table.. after the page refreshes, the old data comes back and not the new one.
    what am i doing wrong?
    regards,
    allen

  • How to pass parameter from 1 stored procedure to another stored procedure inside crystal report

    Hi
    I have several stored procedure in my Crystal Report. I am wondering if it is possible for me to pass a parameter to one of the stored procedure and to use the result of that stored procedure E.g. CustomerCode. To another 2 stored procedure to generate the report dynamically?
    I have 3 stored procedure
    The 1st one is used to gather information and process the calculation
    another 2 stored procedure is used for generate the graph and both of them required to take 2 parameters. The 1st stored procedure will require 1 parameter (E.G. Reference Code) and will return a set of information including the data that could be use on the other 2 stored procedures.
    After I added these 2 stored procedure, it requires me to pass 3 parameters to the report. I would like to know if I could only pass the Reference Code for stored procedure 1 and use it to retrieve the information for the other 2 parameter?
    Thanks in advance
    Chi

    Hi Chi
    To pass parameter from 1 stored procedure to another stored procedure, you will have to create sub report. In your case you will have to create 2 sub reports for 2nd and 3rd stored procedure and link those sub reports with the main report using Reference Code field in order to pass the values.
    After creating the report when you will refresh the report, it will ask 4 parameters, one parameter for main report, one for the first subreport and two for second subreport to fetch the data correctly.
    Regards
    Poonam Thorat.

  • Crystal report XI - problem to use stored procedure

    When I add a stored procedure in my new report I can't see my argument (parameter). I don't know if I forget something.
    I use an Oracle database and My procedure is :
    CREATE OR REPLACE PROCEDURE Rech_Objet_Dans_Vue (pNomVue VARCHAR2, pTexteVueContient VARCHAR2) AS
    --Date de création: 6 mars 2008
    --Utilisateur: turgema01
    --Procédure créée dans le but de faire une recherche dans le texte d'une vue qui est de type LONG. Comme il n'est pas possible d'effectuer
    --    une fonction sur un champ de type long, nous utilisons cette procédure pour sortir les noms des vues contenant notre critère de recherche
    -- Exemple d'utilisation : EXECUTE Rech_Objet_Dans_Vue('DEC%', '%GAC_PROJ_LOGIC%')
    -- Nous donnera le nom des vues dont le nom de la vue est comme ''dec% et dont le texte de la vue contient '%gac_proj_logic%'
    TYPE TYP_REF_CUR IS REF CURSOR ;
    CVUE TYP_REF_CUR ;
    -- Variables de réception du contenu de la requête
    TEXTlongTOchar VARCHAR2(32767);
    NomVue ALL_VIEWS.view_name%TYPE ;
    BEGIN
      OPEN CVUE FOR 'Select view_name, TEXT From all_views WHERE OWNER = ''FMDTEST'' AND view_name LIKE '''|| pNomVue ||'''';
       LOOP
         FETCH CVUE INTO NomVue,TEXTlongTOchar ;
      --TEXTlongTOchar := SUBSTR(TEXTlongTOchar, 1, 254); Inutile d'afficher le code de la vue puisque qu'on ne peut afficher plus de 254 caractères
      IF TEXTlongTOchar LIKE pTexteVueContient THEN
         DBMS_OUTPUT.PUT_LINE (NomVue);
      END IF;
       EXIT WHEN CVUE%NOTFOUND;
    END LOOP;
    CLOSE CVUE;
    END;

    It's been a while since I've looked at Oracle stored procedures, but I recall specifying a cursor in the first argument, from which Crystal retrieves the data. 
    Subsequent parameters are used to pass data into the stored proc, and should be exposed in the designer. 
    Example that I have:
    CREATE OR REPLACE PACKAGE vantech IS
        TYPE cursor_weak   IS REF CURSOR;
        TYPE cursor_strong IS REF CURSOR RETURN tueda2%ROWTYPE;
    END vantech;
    CREATE OR REPLACE PROCEDURE tueda2_sp_strong (
        tueda2_cursor IN OUT vantech.cursor_strong,
        tueda2_id    IN      tueda2.id%TYPE ) AS
    BEGIN
        OPEN tueda2_cursor FOR
            SELECT *
            FROM tueda2
            WHERE tueda2.id >= tueda2_id;
    END tueda2_sp_strong;
    CREATE OR REPLACE PROCEDURE tueda2_sp_weak (
        tueda2_cursor IN OUT vantech.cursor_weak,
        tueda2_id    IN      tueda2.id%TYPE ) AS
    BEGIN
        OPEN tueda2_cursor FOR
            SELECT *
            FROM tueda2
            WHERE tueda2.id >= tueda2_id;
    END tueda2_sp_weak;
    Sincerely,
    Ted Ueda

  • Unused stored procedure parameters marked with a check mark in crystal reports

    Post Author: epowers0213
    CA Forum: General
    Hello,
    I have some Crystal Reports that currently use stored procedures as their datasources (I am in the process of modifying them to use datasets instead).  Some of the original reports have check marks next to stored procedure parameters which I cannot find as being used anywhere in the report.  Is this a legitimate possibility? (Some of them do not have check marks, however, so it is not consistent.)
    More Info:  I am using Crystal Reports within Visual Studio 2005.  I have looked through each report in every way I can think of to find if a parameter field is being used anywhere - I have checked all formula fields, the formatting formulas for sections and individual fields, the record and group selection formulas and the grouping and sorting experts, along with any subreports (although some of them have no subreports).
    (I have read on other forums that exporting a report definition file is another way to look for where fields or parameters are being used, but this does not appear possible within Visual Studio 2005.)
    In some cases, I have gone ahead and replaced the stored procedure datasource location with a dataset (generated based on the same stored procedure).  When I do this, Crystal automatically deletes the stored procedure parameters from the report, and I have still been able to run the modified report successfully - at least it looks ok and nothing is complaining.  So is it possible that these parameters were actually not being used anywhere on the report although they were marked with a check mark?
    Any help would be greatly appreciated!  I want to make sure I am not changing the function of these reports somehow without knowing it...
    Thank you!

    Are you referencing another database that Crystal can't see? Also, you can try and copy the SQL to a command object in Crystal to see if it behaves differently there.

  • Crystal Reports can't add stored procedure using Oracle Provider for OLE DB

    Hello,
    I am trying to bind an oracle stored procedure to a crystal report through Visual Studio 2008.
    This oracle stored procedure returns a ref cursor.
    I am using an oracle 11g database (11.2.0.2.0) .
    When I use the Oracle Provider For OLE DB driver to bind the store procedure with the report, I get the following error message:
    Description : ORA -06550 Line 1 Column 7
    PLS 00306 wrong number of types or arguments to the "Strored Procedure Name"
    But When I use the Microsoft OLE DB provider for oracle driver, I can bind the stored procedure to the report successfully .
    I cannot use the Microsoft OLE DB provider for oracle driver because it does not support the CLOB data type which I plan on having the stored procedure return once I can get everything working.
    I have tried setting PLSQLRSET = 1 IN "HKEY_LOCAL_MACHINE\SOFTWARE\KEY_OraDb11g_home1\OLEDB", but that does not seem to work either
    Any assistance would be greatly Appreciated
    My Stored procedure is very simple as the moment (I just need to get it working then I'll add more stuff). Here's what it looks like:
    CREATE OR REPLACE PACKAGE PROMO.PKG_REPORT as
    TYPE OUT_Type IS REF CURSOR;
    procedure Report_ThisReport (
    p_ThisIdField IN number,
    IO_CURSOR IN OUT OUT_Type
    end PKG_REPORT;
    CREATE OR REPLACE PACKAGE BODY PROMO.PKG_REPORT as
    procedure REPORT_ThisReport (
    p_ThisIdField IN number,
    IO_CURSOR IN OUT OUT_Type
    IS
    BEGIN
    OPEN IO_CURSOR FOR
    SELECT ThisField
    FROM ThisTable
    WHERE ThisIdField = p_ThisIdField ;
    END REPORT_ThisReport;
    end PKG_REPORT;
    Edited by: 894988 on Nov 3, 2011 2:45 PM
    Edited by: 894988 on Nov 3, 2011 2:46 PM
    Edited by: 894988 on Nov 3, 2011 2:47 PM

    It seems that some questions posted here on the XE forum are really questions about other Oracle technologies.
    Concretely, for you there is an Oracle Provider for OLE DB Forum that is active and a terrific resource for you to use.
    Oracle Provider for OLE DB
    Cheers!

Maybe you are looking for

  • Can you pls help me?

    Hi! For part of my homework I have to use a Calendar. A guy in my class gave me a program but it like, doesn't work! When I print out the date I get 9/4/2003 but it's like, May not April! Help me pls! Thanx! JS

  • Launching Aperture issues

    When I launch Aperture, it initializes by showing "opening Aperture library" but after a few seconds it stops and does not open the program.  How do I launch Aperture?  It worked before, not anymore.  I've downloaded latest updates, but still have is

  • Skype login problems

    Hi there! When I try to login to skype it says sorry , we didnt recognize your sign-in details.Please check your skype-name and password and try again. I know my username and password is fine I try on my other PC too , tried to uninstall and install

  • New iTunes - Artwork downloaded doesn't match

    I just installed the latest iTUnes version. I have gone through my whole library and downloaded the artwork (album covers) but when the artwork doesn't match, I try to delete it but the wrong cover stays, and I have no way to remove it..... Does anyo

  • Acurrate process to clone and transfer all the disk to another tiger computer....

    Please guys would be kind enough to show me an easy and acurrate process which incude process to clone AND transfer all the disk from my powerbook G4 (10,4,11) to a macbook (2,1)also tiger computer 10,4,11.... (Carbon copy cloner or easier again you