SAP Knowledge Base Article - Public

1217148 - What is the maximum size for a SQL Query added to a Command in Crystal Reports?

Symptom

  • What is the number of characters limit for a Command Object?
  • In Crystal Reports, the Add Command function is used to enter a custom SQL Query for the report to execute. What is the maxium number of characters we can enter for the SQL Query?

Environment

  • SAP Crystal Reports 2008
  • SAP Crystal Reports 2011
  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016

Reproducing the Issue

  1. In Crystal Reports, create a new report off any relational data source.
      
  2. In the "Database Expert", under the database connection, double click on "Add Command"
       
  3. In the window "Add Command To Report", you can enter a SQL Query that will be sent to your data source.
    What is the number of characters limit that can be entered for the SQL Query in the "Add Command" window.

Resolution

  • The maximum size for a SQL Query that can be entered in a Command object in Crystal Reports is: 64 KB.
        
  • Note: If your SQL Query is larger than 64 KB, we recommend using a stored procedure.

Keywords

CR, Add Command , 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, developer version for Microsoft Visual Studio ; SAP Crystal Reports, version for Visual Studio .NET 2005 ; SAP Crystal Reports, version for Visual Studio .NET 2008