SAP Knowledge Base Article - Public

1843192 - Report based on Oracle View returns wrong data in Crystal Reports

Symptom

  • Incorrect data set.
  • Wrong value is displayed in a report based on Oracle Native connection in Crystal Reports.

Environment

  • SAP Crystal Reports 2008
  • SAP Crystal Reports 2011
  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016
         
  • Oracle 10g
  • Oracle 11g
  • Oracle 12c

Reproducing the Issue

  1. Create a package with a Function in Oracle as test.
  2. Create a View like "create view viewname as select field1, field2, package.test(field) as Alias from tablename.
  3. Create report using Oracle Server and add a command object as "Select * from viewname".
  4. The data returned by the column having package function gives wrong data e.g. if the value returned by the package.test(field) is 408 then the value displayed on the report is 100.

Resolution

  • Use an ODBC connection to Oracle, instead of the Oracle Native connection:
    1. Change the Oracle Server connection to ODBC connection.
    2. Go to Database -> Set Data Source Location...
    3. Select the existing Oracle Server connection from Current Data Source.
    4. Under Replace with section, create a new connection using ODBC(RDO) type of connectivity.
    5. Click on Update and close the Set Datasource Location box.
    6. The data displayed by the field package.test(field) is correct value..

Keywords

Wrong data in report, Package returns incorrect data. , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , Problem

Product

Crystal Reports 2008 V1 ; SAP Crystal Reports 2001 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2011, feature pack 03 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016