SAP Knowledge Base Article - Public

2824998 - Crystal Reports hang when refreshing a report based off SAP Table, Cluster, or Function

Symptom

  • Crystal Reports is not responding when refreshing a report.
  • When refreshing a report based off an SAP Table, or SAP ERP system, Crystal Reports hangs.
  • The same report refresh successfully in Crystal Reports on other computers.
  • Able to create a new report off the same SAP Table, but not able to refresh the report.

Environment

  • SAP Crystal Reports 2011
  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016  

Reproducing the Issue

  1. In Crystal Reports, create a new report to an SAP data source using the connection: SAP Table, Cluster, or Function.
        
  2. Add a Table to the report.
      
  3. Insert at least one database fields in the Details section of the report.
      
  4. Refresh the report.
          
    Notice Crystal Reports hang, or stop responding.

Cause

  • Crystal Reports cannot communicate to the SAP System specified because the SAP System host name cannot be resolved on the network.
           
  • When connecting to an SAP Table, Cluster, or Function from Crystal Reports, it uses the SAP Open SQL Driver. When performing a trace on the SAP Open SQL driver, you will notice the SAP System host name cannot be resolved on the network, and this is why Crystal Reports hangs, as it is waiting for a response from the SAP System:
       
       SAP: An error occurred while trying to contact the SAP gateway using: ...  Message:
       ERROR           hostname '<HOST NAME>' unknown
       TIME              <Date and Time>
       RELEASE        <SAP System version>
       COMPONENT   NI (network interface)
       VERSION        <Version>
       RC                  -2
       MODULE          ninti.c
       LINE                898
       DETAIL           NiPGetHostByName: '<HOST NAME>' not found
       SYSTEM CALL   getaddrinfo
       COUNTER         1
      
  • For information on how to create a log for Crystal Reports, see the SAP Knowledge Base Article: 1220085

Resolution

  • To be able to communicate with the SAP System host, add the IP Address of the SAP System in the hosts file of the computer where Crystal Reports is installed:
        
    1. Obtain the IP Address of the host for the SAP System.
            
    2. In MS Windows, navigate to the following path:
       
          C:\WINDOWS\System32\drivers\etc\
          
    3. Open the 'hosts' file in a text editor, and add the host name and IP Address like:

          <IP Address of the SAP System host>          <SAP System Host Name>
       
    4. Save the change.

Keywords

CR, SAP ERP , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016