- 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".
"Formatting formulas must be print-time formulas".
Why do these error messages appear and how do you resolve them?
- 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
- In Crystal Reports XI or higher, open a report.
- It displays the error.
- 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.
- 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.
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
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