SAP Knowledge Base Article - Public

1230453 - Command Object vs Subreport

Symptom

Command Object vs Subreport:

  • Report has a parameter (?Club) to select records for particular ClubID, but also needs to have total summary for the company.
  • There are two options to get a summary: using command object or using a subreport. Both options return the same results, but what is the difference?

 

 

 

Environment

  • Crystal Reports XI
  • Crystal Reports 10 
  • Crystal Reports 2008
  • Crystal Reports 2011

Resolution

There are pros and cons in both options:

 

  • Command object may calculate the value on the database side and retrieve results only to the client, where the subreport needs to bring all records to the client and calculate the value.
  • Command object requires linking, otherwise it is not supported. If Command object linked using field with Null values, there could be missing data or wrong results. Subreport does not require links.
  • Subreport is more flexible solution as it gives all Crystal Reports design options where the Command Object only brings the data.

 

 

Keywords

<p>Command Object</p><p>Subreport</p> , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To

Product

Crystal Reports 2008 V1 ; SAP Crystal Reports 10.0 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2011, feature pack 03 ; SAP Crystal Reports XI ; SAP Crystal Reports XI R2