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

How Do I Create Report Section that resembles a Cross-Tab?

Status
Not open for further replies.

michellecole

Programmer
Feb 12, 2004
42
US
I have a Crystal Report that has several Cross-tabs based on a date range and grouped by OperatorID from data in SQL tables. I've condensed a sample below:

12/01/04 - 12/10/04

Operator Operator Operator Operator
10001 10003 10008 Total
Processing Times:
MailSortHrs 0.00 3.50 1.25 4.75
DataEntryHrs 2.07 0.00 0.00 2.07

Processing Volumes:
MailSortVol 0 2144 800 2944
DataEntryVol 19427 0 0 19427

The above cross tabs work fine.

However, I have one Section, "Averages", where I need each cell to contain a formula which calculates the average Formula = sum(<tablename>.Volume)/ sum(<tablename>.Time). I understand that in cross-tabs the cells cannot contain anything but numbers created from summary functions, so the cross tab is not an option in this scenario.

What can I use that will look and act like a cross tab - allowing the number of Operators (columns) to vary by date range. I need something that will look like the following and allow the number of columns to grow based on the number of Operators for the date range. I need the groups to display horizontally instead of vertically and match up under the existing cross tabs. The number of items on the left are fixed - but the number of operators varies:

Averages:
MailSortAvg 0 613 640 620
DataEntryAvg 9385 0 0 9385

Thank you,
Michelle

 
Try posting technical information:

Crystal version
Database
Example data
Expected output

Your example doesn't show any dates, yet your spec states that it varies based on dates...

-k
 
You might be able to use an inserted crosstab--if you are able to create a SQL expression. See thread767-903721 for details on this approach.

-LB
 
Technical Information:
Crystal Versiion: Crystal 8.0
Database: MS SQL Server
Example Data:
OperatorID Date MSHrs MSVol DEHrs DEVol
10001 12/01/04 0 0 1.0 10000
10001 12/05/04 0 0 1.0 8000
10001 12/10/04 0 0 .7 1427
10003 12/05/04 3.5 2144 0 0
10008 12/08/04 1.0 400 0 0
10008 12/09/04 .25 400 0 0

Expected output is reflected in original thread under "Averages".

Report date range is reflected in original thread as 12/1/04 - 12/10/04 (but can be any date range that user enters).

Hope this helps,

Thank you,
Michelle
 
There's something called a 'Mock Crosstab'. My set-up (Crystal 8.5) includes an example from Crystal among the sample reports.

A Mock Crosstab is generally a set of individually defined totals, a vast number of them and it is tedious to definte them all. In Crystal 8.5, you can cut-and-paste to a dummy Crystal report as a short-cut to making large numbers of very similar fields. Change the name on the dummy and then copy back.

Also try a search here on Mock Crosstabs

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top