1414273 - Text displays as black, when using the function: crNoColor, to format the text in Crystal Reports

SAP Knowledge Base Article - Public

1414273 - Text displays as black, when using the function: crNoColor, to format the text in Crystal Reports

Symptom

  • Text displays as black instead of displaying nothing.
  • Expect the text to not display anything when formatting the text using the function: crNoClolor.
  • Text displays as black in Crystal Reports when conditionally formatting the font color using the function: crNoColor.
  • When exporting the report to PDF format, the font color is transparent in the PDF document, which is the expected behavior Crystal Reports should have.

Environment

  • Crystal Reports 2008
  • SAP Crystal Reports 2011
  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016
          
  • SAP Crystal Reports for Enterprise 4.0
  • SAP Crystal Reports for Enterprise 4.1
  • SAP Crystal Reports for Enterprise 4.2

Reproducing the Issue

  1. In Crystal Reports, conditionally format a font color using the function: crNoColor
    • To do so, insert a database field on the report
    • Right click on the field and select: Format Field...
    • In the Format Editor window, under the tab: Font, click on the X-2 button of the option: Color
    • In the Formula Editor, type: crNoColor
        
  2. Preview the report.
      
  3. Notice the text displays as black instead of not appearing on the report.

Cause

  • This is a known issue that has been track under ADAPT00873916, as well as in SAP Note 2297951 

Resolution

  • The issue is resolved in the following product updates:
         
    • Crystal Reports 2013
      • Support Pack 08
            
    • Crystal Reports 2016
      • Support Pack 03
              
            
  • To workaround the issue for lower product versions, conditionally format the font color to display as the same color as the background when you want the text to not display on the report.
     
    Example:
     
    If the background color is white, then in the conditional formula for the font color display the font color as white, so it will look like it doesn't display the text.
    Below are the general steps on how to apply this workaround using the above example:
    1. Open the report in Crystal Reports
       
    2. Right click on the database field on which you conditionally format the font color to use: crNoColor, and in the contextual menu, select Format Field...
       
    3. In the Format Editor window, under the tab: Font, click on the X-2 button of the option: Color
        
    4. In the Formula Editor, replace the function: crNoColor, by the function: crWhite
             
      Now, when viewing the report, the text will not display when the conditional formula meet the criterias to display nothing.

Keywords

Crystal Reports, CR, font color, crNoColor , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , Bug Filed

Product

Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016