Crystalkeen logo; we offer Crystal reports viewers and schedulers
 
Crystalkeen header image 3
Crystalkeen header image 5

Crystal Reports Tools: Improve Performance While Saving Time and Money

Crystal Reports: Summary Functions Inside Your Crosstab

The most common summary used inside the crosstab is the Sum() of a field.

However, all the other summary functions are also available. You can also include more than one summary inside each cell in the crosstab grid.

Use Count to show how many records are included and DistinctCount can also be useful here. Use Maximum or Minimum to show the highest and lowest values of the field.

 

Embedded Summaries in a Crosstab in Crystal Reports 2008

Beginning with Crystal Reports 2008, you can use crosstab functions to create an Embedded Summary in the crosstab. An embedded summary is a new value in a cell in the crosstab, rather than a new row or column.

There are a couple of Crosstab functions we find useful here. To retrieve the first summary from the cell use this as your starting point:

GridValueAt (CurrentRowIndex, CurrentColumnIndex ,0 )

Change the third argument (0) to select other summaries in the cell. So to calculate a ratio of your second and third summaries you could use

GridValueAt (CurrentRowIndex, CurrentColumnIndex ,1 ) /

GridValueAt (CurrentRowIndex, CurrentColumnIndex ,2 )

 

It gets even better. You can use this feature to create percentage crosstabs in a Crystal Report. After you insert a summary field into the crosstab you can make that summary a percentage of the row or column total.

More, below....

 

CrosstabSummary image 001

 

Crosstab Summary image 002

Click Image to Enlarge

This video should prove helpful:

This article is copyrighted by Crystalkeen, Mindconnection, and Chelsea Technologies Ltd. It may be freely copied and distributed as long as the original copyright is displayed and no modifications are made to this material. Extracts are permitted. The names Crystal Reports and Seagate Info are trademarks owned by Business Objects.
 

 

  • Questions? Please write to mark@crystalkeen.com. We do want your business.
  • Do you have your own tips for Crystal Reports administrators and designers? Write to mark@crystalkeen.com and we'll post your tips with a link to your Website (or with some other attribution if you choose).
  • Crystal Reports is a subsidiary of Business Objects, which is owned by SAP.