SAP Knowledge Base Article - Public

1218899 - Error: "Formatting formulas must be print-time formulas" when opening report in Crystal Reports

Symptom

  • Error: "Formatting formulas must be print-time formulas"
  • When opening a report in Crystal Reports XI or higher, that had been created in an earlier version, the following error messages appears:
      
    "The Saved Data will be discarded as one or more of the formulas failed to compile".
      
    Followed by:
      
    "Formatting formulas must be print-time formulas".
     
    Why do these error messages appear and how do you resolve them?

Environment

  • Crystal Reports XI
  • Crystal Reports XI R2
  • SAP Crystal Reports 2008
  • SAP Crystal Reports 2011
  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016
  • SAP Crystal Reports 2020

Reproducing the Issue

  1. In Crystal Reports XI or higher, open a report.
  2. It displays the error.

Cause

  • These error messages appear because the report uses formatting formulas that contain the 'WhileReadingRecords' function.
  • While earlier versions of Crystal Rpeorts allows the use of the 'WhileReadingRecords' function on formatting, Crystal Reports XI does not.
  • Formatting formulas are print-time formulas and should not allow the use of the 'WhileReadingRecords' function.

Resolution

  • This is expected behavior.
        
  • To workaround this situation in Crystal Reports XI and higher, create a 'regular' formula field with the same logic as the formatting formula. You can then reference the output of that 'regular' formula field in the formatting formula.

Keywords

XI CR FORMULAS PRINT TIME WHILE READING RECORDS MIGRATING Crystal Reports Formulas Print-Time , c2017980 , 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 ; SAP Crystal Reports 2020 ; SAP Crystal Reports XI ; SAP Crystal Reports XI R2