Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grand total question in Cross Tabs

Status
Not open for further replies.

lynnshs

Technical User
Nov 20, 2006
10
CA
Full discloseure - this stuff is not my strength!
Anyway, I'm using Crystal 8.5
Cross tab
Rows are: {coursename}
Columns are: {markingcolumn} (There's only have 1 column showing, I've discarded the others under Specify Order)
Summarized field is: {Max of CreditAwarded}

Data is showing correctly.
Now I want a total of the info (ie grand total). Instead of giving me the correct sum, it gives me the max of the values listed. If I change the summarized field to count, the data does not show correctly.
Obviously, I'm missing something.
Thanks for any help.
 
I don't think Crosstab can do that, at least not in 8.5.

The best work-round may be to put summary totals in the Report Footer below the crosstab. Or perhaps Running Totals, depending on what your rules are. See FAQ767-6524 if you're not already familiar with Crystal totaling.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Here is a pretty awkward workaround, but it works. Select an inner cell of the crosstab->right click->format field->suppress->x+2 and enter:

whileprintingrecords;
numbervar x := x + currentfieldvalue;
false

Then select the column total->right click->format field->number->customize->currency symbol tab->click "enable currency"->position: change this to -123$ ->currency symbol->x+2 and enter:

whileprintingrecords;
numbervar x;
space(20)+totext(x,2) //2 for the number of decimals; change as needed

The maximum value will still appear in the crosstab at the left of the summary, with the sum on the right, so resize the summary so that only the sum appears.

Basically, this makes use of the currency symbol area to display the variable results. In later versions, you can use format field->display string for this purpose.

-LB
 
Wow. Brilliant. I'll try it and let you know.
I already changed it to a subreport with several groups and a running total, but I'm going to experiment.
Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top