SAP Knowledge Base Article - Public

1202345 - Is it possible to apply CSS object formatting on a report created in Crystal Reports?

Symptom

  • Is CSS supported in Crystal Reports?
  • Is it possible to use a cascading style sheet (CSS) to format objects in a similar or consistent manner in Crystal Reports? 
      
        
  • Note: Images and data in this SAP Knowledge Base Article is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

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

Resolution

  • Crystal Reports support formatting objects on a report using CSS. To set an object on a report to use CSS formatting:
      
    1. In Crystal Reports, open the report.
         
    2. Right click on an object on the report, and select "Format Field...."
        
    3. In the "Format Editor", under the tab "Common", enter the information under the option: "CSS Class Name"
        
      cssclassname.png
           
            
  • IMPORTANT NOTES:

    • The CSS formatting will only be applied when the report is viewed from an HTML / DHTML viewer, or when called in a Visual Studio .Net web application, because CSS is a HTML feature only.
                       
    • The CSS formatting is not applied when the report is viewed:
      • In Crystal Reports designer;
      • In an application using a .NET Winform viewer;
      • When the report is printed;
      • When the report is exported to other format, like PDF, MS Word, etc...

Keywords

Cascading Style Sheets, Report Templates, Style Sheets, Report Designer , 600195 , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

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