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!

SUM OF A SUM - ahh!

Status
Not open for further replies.

LMCRYER

Programmer
Jul 30, 2001
388
US
I'm going bonkers and need a second pair of eyes.

This is what I have - Oracle backend, Crystal 8.5

The report is set to show information about appointments.

I have 2 groups - 1. @category (formula) 2. book (text field) and one sort on appointmentdate (date field)

This is what I have happening:


# of days

Category A
Book 1 10
Book 2 10
Cat A totals: 16

Book 1 & 2 -- # of days is actually :

distinctcount(appt.date), book

For the category totals I need it to show 20 (the sum of
Book 1 and 2) but using distinctcount(appt.date, @category) wont work - because in some situations, the same date can be within both of these books - and therefore they're counted once, instead of twice.

I've been messing with it and can't seem to get my head on track - can somebody please enlighten me as to how the heck I do this? Thanks!



LMC cryerlisa@hotmail.com

select * from Management where proj_mgmt_skills <> NULL

0 records returned
 
There are a couple of options, but I think the easiest one is to create a formula that combines (concatanate) the
{book_id} and the {appt.date} into a single string.

Then, do a distinct count on that... :eek:)

Cheers,
- Ido CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top