1892878 - Stored Procedure requirements for creating reports in Crystal Reports

SAP Knowledge Base Article - Public

1892878 - Stored Procedure requirements for creating reports in Crystal Reports

Symptom

  • What are the requirements of creating a Crystal report based off a Stored Procedure?

Environment

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

Resolution

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

    1. The stored procedure must produce only one outputted SELECT statement.
      For example: 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. 

    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 outputted 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.

Keywords

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

Product

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