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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sums and Averages in the Same Cross-tab? 1

Status
Not open for further replies.

lynchg

Programmer
Nov 5, 2003
347
US
Is it possible to have the cross-tab control display sums of the row values and also display averages of the columns?

If you change the type of summation in any of the totals fields, it changes it for the whole report.

Crystal Server XI R2 SP 1.

Thanks
 
Insert the field twice, and change one of them to average.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
Thanks, that works very well. The only issue I have now is that the crosstab control fights you as far as sizing and positioning of the text boxes within each cell. I suppressed all of text boxes that I didn't want to see, and also resized them to the minimum height that it will allow. It doesn't allow you shrink them to a height of 0.0, and it doesn't allow you to position the text boxes that are being displayed on top of the suppressed text boxes. That causes the rows of detail lines to have more height than I would like, which stretches the report to more pages than I would like.

But it is an acceptable compromise in order to see the data I want to see, thanks again.
 
Why would you want the height at 0.0? Why is the data even included in the report if you don't want to see it?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
When you use the crosstab control with 2 summarized fields, it automatically creates a set of 4 text boxes for each of those summarized fields (detail value, row total, column total, and grand total.

I had to suppress and shrink the text boxes that I didn't want displayed.
 
Sorry, I didn't really finish my explanation.

With 2 summarized fields, each grid on the report would have 2 values in it. The sum and avg of each detail value (it is the same value), and for each row total you would have both the sum and average for the row, the same for each column total, and likewise for the grand totals.

I wanted to display the averages for the column totals and sums for the row totals, so I suppressed the values I didn't want to see.

If there is a way to control the display other than that, I would like to know about it.
 
Depending upon the crosstab layout, you could add the averages in a second crosstab where you have no column field, and then overlay the second crosstab on the first, removing the appropriate grid lines and suppressing the row labels (assuming you are want averages as row totals).

You might also have better luck with making suppressed summaries "disappear" by using the option to show summaries horizontally rather then vertically.

-LB
 
I tried the horizontal option, that tends to push me out to a second horizontal page when the data create a lot of columns. I'd rather stretch the report vertically than horizontally, having the columns span more than one page within one grid is worse than having the rows get pushed to a second page.

Thanks for the ideas though.
 
Hi I am having a problem am trying to get crystal version 8.5 to do a average on a sum formula it wont do it saying a summary can not be taken my formla I am trying to a average on looks like this :-

whileprintingrecords;Sum({@new readrate},{jobdata.LV24})/Sum ({jobdata.Total_Mail}, {jobdata.LV24})*100

new read rate formula is :={jobdata.total_read} + {jobdata.RTS} + {jobdata.Royal_Mail}

when I try doing an average on this formula :-

whileprintingrecords;Sum({@new readrate},{jobdata.LV24})/Sum ({jobdata.Total_Mail}, {jobdata.LV24})*100

crystal wont allow me todo it pls help any one
 
Please start a new thread. This appears to have nothing to do with a crosstab.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top