SAP Knowledge Base Article - Public

2146560 - How to display the report name in Crystal Reports?

Symptom

  • How to display the report name on a report?
  • In Crystal Reports, how to show the report file name on the report? 
  • Adding the special field: File Path and Name, shows the path as well as the report file name. How to remove the path, and display the report file name only?

Environment

  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016
  • SAP Crystal Reports 2020     

Resolution

  • To display the report file name on the report, create a formula that extract the report file name:
       
    1. In Crystal Reports, open the report on which you will like to display the report file name.
           
    2. Create a Formula that uses the function: FileName, and extract the file name only. The formula will look like:
             
           StringVar ReportName := FileName;
           Right(ReportName, len(ReportName)-InStrRev (ReportName,'\'));
         
    3. Insert the formula where you want to display the report file name on the report.
      For example, insert the formula in the Report Header section. 

Keywords

crystal report, file name, rpt, display report name, CR , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To

Product

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