1358519 - JRC connects Database twice when open a report and refresh it at first time

SAP Knowledge Base Article - Public

1358519 - JRC connects Database twice when open a report and refresh it at first time

Symptom

Duplicate records are retrieved from Database when refreshing Crystal report (CR) by Java Reporting Component (JRC)
JRC connects data source twice when open a report and refresh it at first time

Reproducing the Issue

  1. Create a CR report and connect to a special Oracle stored procedure by JDBC.
  2. This stored procedure is designed for adding one record to a temp table and then return the temp table while this stored procedure is trigged or conneted.
    For example:
    CREATE GLOBAL TEMPORARY TABLE  TEST_TEMP  (      
          F1 VARCHAR2(64),
          F2 NUMBER(10)     
          )
           ON COMMIT PRESERVE ROWS;

    CREATE OR REPLACE PACKAGE TEST_PKG
    AS TYPE AP_CUR IS REF CURSOR ;
    END TEST_PKG;

    CREATE OR REPLACE PROCEDURE TEST_SP (AP_US_CUR  IN OUT TEST_PKG.AP_CUR)
    AS
    TOSQL VARCHAR2(2000);
    BEGIN
    INSERT INTO TEST_TEMP
    SELECT * FROM TEST;
    OPEN AP_US_CUR FOR SELECT * FROM TEST_TEMP;
    END TEST_SP;
  3. Open this report and refresh it by JRC web application.
  4. Duplicate records are retrieved from stored procedure and display in CR Viewer.
  • JRC 11.8.4.1094
  • CR XI R2
  • Oracle 10g
  • JDBC connection

Cause

  • JRC connects data source twice when open a report and refresh it at first time, so that it triggers stored procudure twice to add two records into temp table.
  • This issue is identified and tracked under ADAPT01103649.

Resolution

This issue is fixed and the fix is released with JRC Baily Patch 7 and Crystal Reports for Eclipse (CR4E) 2.0.

Keywords

KBA , BI-DEV-JAV , BI Software Development Kits (SDKs) - Java , Bug Filed

Product

SAP Crystal Reports XI R2