Symptom
-
An error is occurred when a report is executed.
-
Report fails to run with an error: "Syntax error"
Environment
-
SAP Crystal Reports 2011
-
SAP BW 7.01
Reproducing the Issue
-
Create a report using Crystal Reports 2011 based on BEx query.
-
Create a formula @test as: if not(isnull({field})) then field;
-
Save and close the formula. Drag the formula on the report.
-
Refresh the report. It will give Syntax error highlighting the @test formula near not(isnull({field})).
Cause
As # is added to the field for null values in Crystal Report it will not recognize the field and display the error message.
Resolution
-
Edit the formula @test and change the code as below:
-
if not(isnull({field})) or {field}<>"#" then field;
-
Save and close the formula. Drag the formula on the report.
-
Refresh the report. It will execute successfully.
Keywords
Syntax error, CR on BEx query , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem
Product
SAP Crystal Reports 2011 ; SAP Crystal Reports 2011, feature pack 03