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]

Similar Messages

  • 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

  • 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

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

  • 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 Query regarding calling a DB procedure from a Crystal report

    Hi,
    Please tell me how can we call a database procedure from a crystal report  (crystal report XI)?
    I tried by selecting the procedure as a data source for the report; but its giving me an error "Invalid Argument Provided".
    The procedure contains a single Update table statement. Could anyone please help me to resolve this problem as early as possible ?
    Thanks & Regards,
    Priyashree Katkar.

    Duplicate of
    Crystal reports with a DB procedure
    Closing and locking this thread
    Ludek

  • Problem with output data when calling into Oracle stored procedure

    I have a problem that I think I've seen posted by others, but I can't find it anywhere on the forum. Here's what it looks like:
    I have a application that sends a query parameter called custID in a URL to a JSP page.
    http://domain.com/decrypt.jsp?custID=ewsw
    The JSP subsequently calls into the method below to run a decryption stored procedure on an Oracle db. The custId parameter works fine from most clients. However, I have seen the decryption stored procedure return invalid information on some clients in the following case:
    http://domain.com/decrypt.jsp?custID='eirwx
    Here is how I define my call to the DCUSTID (decryption stored procedure):
    public long dCustID(String sCustID)throws SQLException {
    CallableStatement cs = null;
    try {
    long nCustID = 0;
    if(conn == null || conn.isClosed()) {getLocalConnection();}
    String sp = "BEGIN DCUSTID(?,?);END;";
    cs = conn.prepareCall(sp);
    cs.setString(1, sCustID);
    cs.registerOutParameter(2,java.sql.Types.NUMERIC);
    cs.execute();
    nCustID = cs.getLong(2);
    return nCustID;
    }finally { release(cs); }
    I have not been able to find a problem with the stored procedure (although Im not counting that out). Is there any way that the jsp or the code above is corrupting the data before it gets to the stored procedure? I'm very suspicious of the single quote at the begining of the custID query string parameter.
    Thanks

    >
    The JSP subsequently calls into the method below to
    run a decryption stored procedure on an Oracle db.
    The custId parameter works fine from most clients.
    However, I have seen the decryption stored procedure
    e return invalid information on some clients in the
    following case:
    The back tick doesn't matter.
    How do you know that the routine that you posted returns invalid information? Are you printing the value retreived before you return in the code that you posted? That is the only way to tell if that code is the problem vs some translation problem in something else.
    And what do you mean by 'invalid'? It does return a numeric value right? Is it negative? Or so large that it couldn't be a key? Or what?
    The input parameter to the stored proc is a varchar and not a char correct?

  • Out of memory error when calling a java stored procedure multiple times

    Trying to run a PL/SQL loop calling a java stored procedure, I get the following error:
    "ORA-04030: out of process memory when trying to allocate 262188 byte callheap,ioc_allocate free)"
    (with some other error lines).
    The stored procedure does two major things:
    1) Open a socket to communicate with a server, of which it queries some data.
    2) Use JDBC (with the default DB connection it has, as a stored procedure) to write the results to a table.
    All socket connections, statements, etc. are properly closed and all memory should be garbage collected between each call.
    Can anyone offer an explanation or additional checks to make? I'm quite sure the code isn't causing the problem, since I've tried running it as a stand alone application (outside of Oracle) and didn't have any problems.
    Thanks.

    Hi,
    Verify that the database parameters are set correctly.
    EA

  • Error when executing DBMS_ERRLOG through Stored Procedures...

    Hi,
    We have TWO schemas like IDWH_ODS and IDWH_ERR running on Oracle 10g Rel.2.
    The schema IDWH_ERR has direct SELECT privilege on all the base tables in IDWH_ODS schema. (As Pl/sql doesn't support ROLE, we have granted direct SELECT on each of the tables)
    IDWH_ODS schema has tables like ACCOUNT & CUSTOMER, for which I need to create DML Error logging tables in IDWH_ERR schema.
    I have one procedure 'Cr_Errlog_Tabs' in IDWH_ERR schema which gets all tables in IDWH_ODS and creates Error logging table in IDWH_ERR schema using DBMS_ERRLOG package. My problem starts here,
    When I execute the DBMS_ERRLOG package in IDWH_ERR through SQL*Plus LIKE,
    > exec DBMS_ERRLOG.CREATE_ERROR_LOG('idwh_ods.ACCOUNT','ERR$_ACCOUNT','idwh_err');
    it's creating the error log table 'ERR$_ACCOUNT' in IDWH_ERR schema.
    (...the same will be working when execute through Anonymous plsql block)
    BUT, when i execute the DBMS_ERRLOG package with same parameters through the stored Procedure 'Cr_Errlog_Tabs', it throws the following error...
    ORA-01031: insufficient privileges
    Please let me know how the solution at the earliest.

    WHY DO YOU FEEL YOU HAVE TO START A NEW THREAD FOR YOUR PROBLEM!?
    Insufficient priv error when executing DBMS_ERRLOG through PLSQL

  • Please Help!!!!! Problem Migrating from sql 2000 stored procedure to PL/SQL

    I have used a tool to convert my sql 2000 stored procedure to Oracle 10g PL/SQL, here is an example
    SQL 2000 Stored Procedure
    CREATE PROCEDURE [GetEmployees]
    AS
    Select * from EMPMST ORDER BY emp_name
    GO
    After Transformation i got 2 files, one was a procedure and other a package
    CREATE OR REPLACE PACKAGE GLOBALPKG
    AS
         TYPE RCT1 IS REF CURSOR;
         TRANCOUNT INTEGER := 0;
         IDENTITY INTEGER;
    END;
    CREATE OR REPLACE PROCEDURE GetEmployees
         RCT1 IN OUT      GLOBALPKG.RCT1
    AS
    BEGIN
         OPEN RCT1 FOR
         SELECT *
         FROM EMPMST
         ORDER BY emp_name;
    END;
    When i execute the procedure GetEmployees i got this error :
    SQL> execute GetEmployees;
    BEGIN GetEmployees; END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'GETEMPLOYEES'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Please Help me in debugging this error. Thanks in advance.

    As the poster above mentioned you cannot call "GetEmployees" without a parameter.
    Note that the procedure declaration has the following line
    RCT1 IN OUT GLOBALPKG.RCT1
    This means that whenever you want to call the procedure you must pass it a variable of type GLOBALPKG.RCT1
    However unless this is merely a homework or learning exercise (i.e. you are not porting the code of a production application) i would strongly recommend that you do not attempt to simply convert the code to PL/SQL.
    The reasoning behind this is that Oracle's architecture will be completely different to the source of the original code and if you attempt to simply port the code (especially using an automatic tool) you will almost certainly hit problems.
    For example the SQL Server's 2000 code may (should be) be written based on SQL Server's locking strategy. Oracle's locking strategy is completly different if you try to use the same techniques as you do in SQL Server the performance will suffer.
    Porting a code or a database schema from one platform to another involves a lot of analysis in order to take advantage of the features of the destination platform.
    As I said this may not be important to you depending on why you are attempting a port.
    Good Luck.

  • Problem with Update Select in Stored procedure

    I am using Oracle 8. I'm writing a StoredProcedure and Oracle doesn't like the statement:
    update
    Leave_Coverages
    set
    Rate_Monthly = Rate_Monthly + (select Rate_Monthly from Leave_coverages where Leave_Coverage_ID = 10800)
    where
    Leave_Coverage_ID = 10799;
    When I run the above statement from the command line - I have no problem. This statement in the stored procedure works:
    update
    Leave_Coverages
    set
    Rate_Monthly = Rate_Monthly + 4
    where
    Leave_Coverage_ID = 10799;
    So essentially, I'm having trouble using a select in an update statement, but only in a Stored Procedure.

    Denis,
    This question was answered on this forum in the last week or so but I wasn't quickly able to locate this post.
    Basically Oracle prior to version 9 had an SQL parser and a separate PL/SQL parser. The PL/SQL parser had to be updated each time new features were added to the SQL parser; often it lagged behind so that there were things you could do in plain SQL but weren't supported when using the same SQL in a cursor or directly in PL/SQL (with an INTO clause or RETURNING ... INTO clause).
    From Oracle 9 these two parsers have been rolled into one so that new features introduced into SQL automatically also become available when used from PL/SQL.
    So the answer to your curiousity on whether it will work in 9 or 10 is: if it works in SQL it should work just fine from PL/SQL.
    Cheerio,
    Colin

  • Sqlexception ,when trying to access stored procedure

              hi
              i have a strange problem, iam using jsp code for accessing stored procedure in sql
              server database, below is my java code which calls stored procedure,
              <%
                   CallableStatement cstmt=null;
                   String sql= "{?= call ascs_submit_prem_adj(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}";
                   cstmt=con.prepareCall(sql);
                   cstmt.registerOutParameter(1,java.sql.Types.INTEGER);
                   cstmt.registerOutParameter(2,java.sql.Types.INTEGER);
                   cstmt.setObject(3,adjustId);
                   cstmt.setString(4,co_id);
                   cstmt.setString(5,policyNo);
                   cstmt.setString(6,subPolicy);
                   cstmt.setString(7,busDiv);
                   cstmt.setString(8,commAcct);
                   cstmt.setString(9,agentId);
                   cstmt.setString(10,premAmount);
                   cstmt.setString(11,dueDate);
                   cstmt.setString(12,lobCd);
                   cstmt.setString(13,commAmount);
                   cstmt.setString(14,commReason);
                   cstmt.setString(15,recovFlag);
                   cstmt.setString(16,recovPercent);
                   cstmt.setString(17,combId);
                   cstmt.setString(18,payFlag);
                   cstmt.setString(19,combAcct);
                   cstmt.setString(20,combSub);
                   cstmt.setString(21,paidFlag);
                   cstmt.setString(22,changeBy);
                   cstmt.setString(23,transDt);
                   cstmt.execute();
              ERROR LINE-->     adjustId=cstmt.getObject(2).toString();
                   spReturnCode=cstmt.getInt(1);
              %>
              i hv two output parameters,,when i try to get the second output parameter (ie ERROR
              LINE)
              IAM GETTING a strange error, i don't know what it is? this is the error i got
              Tue Feb 13 10:06:26 EST 2001:<E> <ServletContext-General> exception raised on '/
              PremAdjSubmit.jsp'
              java.sql.SQLException: Invalid column number (2). This table has 1 columns (a va
              lid index is 1 trough 1).
              at weblogic.jdbcbase.mssqlserver4.TdsResultSet.getEntry(TdsResultSet.jav
              a, Compiled Code)
              at weblogic.jdbcbase.mssqlserver4.TdsResultSet.getObject(TdsResultSet.ja
              va, Compiled Code)
              at weblogic.jdbcbase.mssqlserver4.TdsStatement.getObject(TdsStatement.ja
              va:2338)
              at jsp_servlet._premadjsubmit._jspService(_premadjsubmit.java, Compiled
              Code)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java, Compiled Code)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java, Compiled Code)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java, Compiled Code)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java, Compiled Code)
              at weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
              ContextManager.java, Compiled Code)
              at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
              a, Compiled Code)
              at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java, Com
              piled Code)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
              detailed error-----------
              Error Found
              Oops! an exception occurred.
              The name of the exception is
              java.sql.SQLException: Invalid column number (2). This table has 1 columns (a valid
              index is 1 trough 1).
              can any one help me out...
              thanks
              san
              

              hi
              i have a strange problem, iam using jsp code for accessing stored procedure in sql
              server database, below is my java code which calls stored procedure,
              <%
                   CallableStatement cstmt=null;
                   String sql= "{?= call ascs_submit_prem_adj(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}";
                   cstmt=con.prepareCall(sql);
                   cstmt.registerOutParameter(1,java.sql.Types.INTEGER);
                   cstmt.registerOutParameter(2,java.sql.Types.INTEGER);
                   cstmt.setObject(3,adjustId);
                   cstmt.setString(4,co_id);
                   cstmt.setString(5,policyNo);
                   cstmt.setString(6,subPolicy);
                   cstmt.setString(7,busDiv);
                   cstmt.setString(8,commAcct);
                   cstmt.setString(9,agentId);
                   cstmt.setString(10,premAmount);
                   cstmt.setString(11,dueDate);
                   cstmt.setString(12,lobCd);
                   cstmt.setString(13,commAmount);
                   cstmt.setString(14,commReason);
                   cstmt.setString(15,recovFlag);
                   cstmt.setString(16,recovPercent);
                   cstmt.setString(17,combId);
                   cstmt.setString(18,payFlag);
                   cstmt.setString(19,combAcct);
                   cstmt.setString(20,combSub);
                   cstmt.setString(21,paidFlag);
                   cstmt.setString(22,changeBy);
                   cstmt.setString(23,transDt);
                   cstmt.execute();
              ERROR LINE-->     adjustId=cstmt.getObject(2).toString();
                   spReturnCode=cstmt.getInt(1);
              %>
              i hv two output parameters,,when i try to get the second output parameter (ie ERROR
              LINE)
              IAM GETTING a strange error, i don't know what it is? this is the error i got
              Tue Feb 13 10:06:26 EST 2001:<E> <ServletContext-General> exception raised on '/
              PremAdjSubmit.jsp'
              java.sql.SQLException: Invalid column number (2). This table has 1 columns (a va
              lid index is 1 trough 1).
              at weblogic.jdbcbase.mssqlserver4.TdsResultSet.getEntry(TdsResultSet.jav
              a, Compiled Code)
              at weblogic.jdbcbase.mssqlserver4.TdsResultSet.getObject(TdsResultSet.ja
              va, Compiled Code)
              at weblogic.jdbcbase.mssqlserver4.TdsStatement.getObject(TdsStatement.ja
              va:2338)
              at jsp_servlet._premadjsubmit._jspService(_premadjsubmit.java, Compiled
              Code)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java, Compiled Code)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java, Compiled Code)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java, Compiled Code)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java, Compiled Code)
              at weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
              ContextManager.java, Compiled Code)
              at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
              a, Compiled Code)
              at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java, Com
              piled Code)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
              detailed error-----------
              Error Found
              Oops! an exception occurred.
              The name of the exception is
              java.sql.SQLException: Invalid column number (2). This table has 1 columns (a valid
              index is 1 trough 1).
              can any one help me out...
              thanks
              san
              

  • Crystal Report not showing fields when connected to a stored procedure

    I have a Stored Procedure that returns results when run in SQL Server, but when I add this to a Crystal Report it doesn't show any fields in the Field Explorer. But if I try any other SP, it works fine and I can see its fields.
    As you can see in the picture below, I am unable to expand the fields in the report while creating the report using standard report procedure too.
    I tried different ways, but nothing worked for me here. Please help me here.
    (FYI, I am using Crystal Reports 2008, SQL Server 2008R2)

    Hi Jamie,
    I just found out the reason for this issue.
    I wrote the stored procedure using the fields in the Datamart but the fields in the datamart in backend are connected to a different database which doesn't have SQL Server Authentication (for the Credentials) and that's the reason I was getting this issue.
    Once my BI team granted the permission, for that fields connecting to the backend database, I was able to see all fields in the Crystal Report.

  • Problem creating dataset using db2 stored procedure in Eclipse BIRT

    Hi,
    I am using DB2 9.7 Express Edition in Eclipse BIRT(version 2.5.1) for generating reports. I have used Type4 driver for jdbc connection.
    For that, I have established jdbc connection using db2jcc.jar and db2jcc_license_cu.jar files.
    I have successfully created data source, say DB2BIRT having following requisites-
    Driver Class - com.ibm.db2.jcc.DB2Driver ( v3.50)
    Driver URL - jdbc:db2://localhost:50000/database_name
    User name - user_name
    Password - Password
    I have written some stored procedures and trying to use resultsets from those stored procedures into my report..
    The stored procedures having involvement of only single resultset are working absolutely fine for new dataset using above DB2BIRT.
    But, I am unable to create new dataset using stored procedures those having involvement of multiple resultsets.
    I am getting following error as -
    org.eclipse.birt.data.engine.odaconsumer.PreparedStatement$SequentialResultSetHandler getMoreResults
    SEVERE: Cannot get more result sets from the statement.
    Cannot get the result set.
    SQL error #1: [jcc][10120][10943][3.50.152] Invalid operation: statement is closed. ERRORCODE=-4470, SQLSTATE=null
    org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot get the result set.
    SQL error #1: [jcc][10120][10943][3.50.152] Invalid operation: statement is closed. ERRORCODE=-4470, SQLSTATE=null
    com.ibm.db2.jcc.b.SqlException: [jcc][10120][10943][3.50.152] Invalid operation: statement is closed. ERRORCODE=-4470, SQLSTATE=null
    at org.eclipse.birt.report.data.oda.jdbc.CallStatement.getMoreResults(CallStatement.java:1760)
    at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaAdvancedQuery.getMoreResults(OdaAdvancedQuery.java:214)
    at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement$SequentialResultSetHandler.getMoreResults(PreparedStatement.java:5183)
    at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.getMoreResults(PreparedStatement.java:792)
    at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.flushResultSets(PreparedStatement.java:1009)
    at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.close(PreparedStatement.java:980)
    at org.eclipse.birt.data.engine.executor.DataSource$DataSourceReleaser.run(DataSource.java:374)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: com.ibm.db2.jcc.b.SqlException: [jcc][10120][10943][3.50.152] Invalid operation: statement is closed. ERRORCODE=-4470, SQLSTATE=null
    at com.ibm.db2.jcc.b.wc.a(wc.java:55)
    at com.ibm.db2.jcc.b.wc.a(wc.java:102)
    at com.ibm.db2.jcc.b.tk.db(tk.java:3118)
    at com.ibm.db2.jcc.b.tk.a(tk.java:1063)
    at com.ibm.db2.jcc.b.tk.getMoreResults(tk.java:908)
    at org.eclipse.birt.report.data.oda.jdbc.CallStatement.getMoreResults(CallStatement.java:1756)
    ... 7 more
    Moreover, I tried to resolve above issue by changing Driver Class from com.ibm.db2.jcc.DB2Driver ( v3.50) to com.ibm.db2.jcc.uw.DB2StoredProcDriver ( v3.50)
    So again while *"Test Connection"* for new Data source using this new driver class for stored procedure, there is an error reflection as -
    org.eclipse.birt.report.data.oda.jdbc.JDBCException: The selected driver cannot parse the given url.
    at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.testConnection(JDBCDriverManager.java:627)
    at org.eclipse.birt.report.data.oda.jdbc.ui.util.DriverLoader.testConnection(DriverLoader.java:120)
    at org.eclipse.birt.report.data.oda.jdbc.ui.util.DriverLoader.testConnection(DriverLoader.java:133)
    at org.eclipse.birt.report.data.oda.jdbc.ui.profile.JDBCSelectionPageHelper.testConnection(JDBCSelectionPageHelper.java:653)
    at org.eclipse.birt.report.data.oda.jdbc.ui.profile.JDBCSelectionPageHelper.access$7(JDBCSelectionPageHelper.java:627)
    at org.eclipse.birt.report.data.oda.jdbc.ui.profile.JDBCSelectionPageHelper$7.widgetSelected(JDBCSelectionPageHelper.java:549)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3493)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3112)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
    at org.eclipse.jface.window.Window.open(Window.java:801)
    at org.eclipse.birt.report.designer.ui.dialogs.BaseDialog.open(BaseDialog.java:110)
    at org.eclipse.birt.report.designer.data.ui.actions.EditDataSourceAction.doAction(EditDataSourceAction.java:68)
    at org.eclipse.birt.report.designer.internal.ui.views.actions.AbstractElementAction.run(AbstractElementAction.java:70)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3493)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3112)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
    Can anybody address my this issue for successful implementation of stored procedure(with involvement of multiple resultsets) for creating Data set in Eclipse BIRT ?
    I will be really thankful.
    Thanks in advance,
    Manasi

    Well, in my stored procedure I have used 2 to3 cursors(as per my business logic) and all cursors except one are holding result sets. That exceptional cursor is intended for holding as well as returning result set after call to the procedure. And its perfectly running on db2 and returning the desired output. The problem is with Eclipse. The same procedure is not working in Eclipse BIRT.

  • Problem in package run inside stored procedure

    i have ssis package to import data from excel to database.
    package is running correctly inside BIDS.
    but when i run package under stored procedure it is giving error :
    Error:   Code: 0xC0014023
       Source: loop sheets in excel
       Description: The GetEnumerator method of the ForEach Enumerator has failed with error 0x80040E21 "(null)". This occurs when the ForEach Enumerator cannot enumerate.

    Hi BI_DEV_19,
    Does the package connects with network resources? If so, try set the job step to run under a proxy account that is created based on a domain account. In BIDS, the package runs under the Windows account that you log onto the operating system.
    The error message “The GetEnumerator method of the ForEach Enumerator has failed with error 0x80040E21” may occur because the ADODB.dll file is corrupted or missing.  You can check whether the ADODB.dll exists in the following folder:
    C:\program files (x86)\Microsoft.NET\Primary Interop Assemblies
    In this situation, you can back up the existing ADODB.dll file, and copy one from another machine to this server.
    Regards,
    Mike Yin
    TechNet Community Support

Maybe you are looking for