SAP Knowledge Base Article - Public

1892878 - Stored Procedure requirements for creating reports in Crystal Reports


  • List of requirements for Stored Procedure.
  • What are the requirements to be able to report off a Stored Procedure in Crystal Reports?


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


  • In order for Crystal Reports to be able to report off Stored Procedures, the following must be observed:

    1. The stored procedure must produce only one output SELECT statement.
      In more details: A stored procedure that return a dynamic SQL Query where the number of database fields added to the SELECT clause is different will not work in Crystal Reports, because the reporting tool requires a static output in order to design the report. 
      For example: A stored procedure that return 3 fields in specific case, and 10 in a different case, is not supported. It always have to return the same number of database fields, with the same data type.

    2. If there is any output from the stored procedure before the outputted SELECT statement, Crystal Reports attempts to retrieve data from this output but the output does not match the fields that are in the report. For example, stored procedures designed to return any messages before the outputted SELECT statement will not display data in Crystal Reports. Crystal Reports will fail to display any data.

    3. Output parameters cannot be used with the stored procedure.

    4. If any variables or functions are used in the output SELECT statement, they must be assigned proper aliases as fields.

    5. Ensure you have sufficient privileges to execute the stored procedure.
      Insufficient privileges may result in the stored procedure to be missing from the list of available stored procedures to report off. If you are uncertain of whether or not you have sufficient privileges, contact your Database Administrator (DBA) for assistance.

  • For Oracle, there are additional requirements. For more details, see the SAP Knowledge Base Article 1181947


Stored Procedure Limitations, restrictions SP CR , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , How To


Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016