SAP Knowledge Base Article - Public

2085892 - Error: "Failed to Retrieve data from database" while refreshing a report based on XML data source in Crystal Reports

Symptom

  • Error: "Failed to retreive data from Database"
  • In Crystal Reports, when trying to refresh a report based on XML, the following error occurs:
    "Failed to retreive data from Database"

Environment

  • SAP Crystal Reports 2020
  • SAP Crystal Reports 2025

Reproducing the Issue

  1. In Crystal Reports, create a new report based on XML with large data using the XML and Webservices connection.
  2. Refresh the report
  3. After some time, it displays the error: "Failed to retreive data from Database"

Cause

XML driver uses Java. The memory allocated to the JVM is not large enough to handle the large number of records.

Resolution

Increase the memory for the Java Virtual Machine (JVM) used for the XML connection: 

  1. Close Crystal Reports.
      
  2. On the computer where Crystal Reports is installed, navigate to the location of CRConfig.xml file

    Default file path:  C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\java\ 

  3. In a text application like Notepad, open the file: CRConfig.xml
       
  4. For the option: JVMMaxHeap, increase the value for the memory, like:

         <JVMMaxHeap>512000000</JVMMaxHeap>

  5. For the option: JVMMinHeap, also incrase the value for the memory, like:  

         <JVMMinHeap>256000000</JVMMinHeap>
       
  6. Save the CRConfig.xml file

  7. Start Crystal Reports, and re-open the report.

  8. Refresh the report, and it will refresh successfully. But if you are still receiving an error, increase the JVM memory to a larger value. 

Keywords

cr, failed to retreive data, crystal report, cr, xml, javaheap, jvm , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

SAP Crystal Reports 2020 ; SAP Crystal Reports 2025