SAP Knowledge Base Article - Public

3095969 - Crystal Reports crash when exporting reports to MS Excel - Data Only

Symptom

  • Crystal Reports crash.
  • Exporting reports to Excel - Data Only, or Microsoft Excel Workbook, causes Crystal Reports to crash.
  • Can successfully export reports from Crystal Reports to any other format, like: PDF, Text, Words,...
  • Can successfully export reports from Crystal Reports installed on other computers to MS Excel - Data Only. It only crash from specific computer.

Environment

  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016 

Reproducing the Issue

  1. In Crystal Reports, open a report.
  2. Export the report to one of the following format:
    - Microsoft Excel (97-2003) Data-only; or
    - Microsoft Excel Workbook Data-only
  3. Crystal Reports then crash.

Cause

  • Registry key: KeepObjectFormattingWhenNullValue, caused Crystal Reports to crash because it was incorrectly defined as QWORD (64bit), when it should have been defined as DWORD (32bit)

Resolution

  • Delete the registry key: KeepObjectFormattingWhenNullValue, and re-create it as DWORD (32bit) 
       
    WARNING: The following resolution involves editing the registry. Using the Registry Editor incorrectly can cause serious problems. Use the Registry Editor at your own risk. Refer to the SAP Knowledge Base Article 1323322 for more information. 
      
    1. Open the Microsoft Registry Editor  ( Regedit )
         
    2. In the MS Windows Registry Editor, navigate to the following path:
         
      • For 32bit version of MS Windows:
        HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\Export\Excel
                
      • For 64bit version of MS Windows:
        HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\Export\Excel
          
                 
    3. Delete the registry key: KeepObjectFormattingWhenNullValue, by right clicking on it, and selecting "Delete"
         
    4. To re-add the key: KeepObjectFormattingWhenNullValue, as DWORD (32-Bit )
      • 4.1  Right clicking on the folder "Excel", and select "New - DWORD (32-bit) Value"
      • 4.2  Enter the key name: KeepObjectFormattingWhenNullValue
            
    5. Set the value to: 0
        
      The valid values for KeepObjectFormattingWhenNullValue, are:
         0 : To not export objects formatting for NULL values to MS Excel, like it used to be in older version of Crystal Reports.
         1 : To export the object formatting for NULL values to MS Excel Data-Only format.

    Keywords

    • CR, crash
    , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

    Product

    SAP Crystal Reports 2013 ; SAP Crystal Reports 2016