SAP Knowledge Base Article - Public

1498799 - SQL Syntax Error in Crystal Reports Command Object After adding a parameter


Crystal Reports Command Object works fine until adding a new string parameter

Reproducing the Issue

  • As an Example
    • Sql is Select * From Customer
    • Add string parameter {?PARAM1} to command object
    • Add where CustomerName = {?PARAM1} to the end of sql statement so it is now Select * From Customer where CustomerName = {?PARAM1}
    • Click ok, receive error


  • {?PARAM1} changes to text that is entered by the user at run time
  • SQL statement requires single quote marks around text


  • Add the single quotes
  • Select * From Customer where CustomerName = '{?PARAM1}'


invalid , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem


SAP Crystal Reports XI