SAP Knowledge Base Article - Public

1839888 - Syntax error is occurred when a report is refreshed in Crystal Reports 2011.

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

  1. Create a report using Crystal Reports 2011 based on BEx query.
  2. Create a formula @test as: if not(isnull({field})) then field;
  3. Save and close the formula. Drag the formula on the report.
  4. 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

  1. Edit the formula @test and change the code as below:
  2. if not(isnull({field})) or {field}<>"#" then field;
  3. Save and close the formula. Drag the formula on the report.
  4. Refresh the report. It will execute successfully.

Keywords

Syntax error, CR on BEx query , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , Problem

Product

SAP Crystal Reports 2011 ; SAP Crystal Reports 2011, feature pack 03