add a summarized field without totaling by group...
Posted on 2003-12-09
This is probably a simple one...or not.
Using Crystal Reports 8.5, I'm running a query from an Informix database. The query consists of
and some others. The result should be for each period there will be an invoice. That invoice will have a dollar amount with multiple worked hour entries for each timekeeper. I want the report to sum the worked hours by timekeeper-clientnumber-invoice-period.
If I run this query right out of Informix (dbaccess) I can select distinct records and sum the worked hours in that fashion. If I try this in Crystal, (summing worked hours), it will sum all worked hours for all timekeepers.
Basically if Joe had two time entries in January (5 hours and 2 hours) for client XYZ, I want the query to sum his hours (7 hours) and not include Nancy who had one time entrie of 2 hours for the same month and client.
Here is a copy of the query (not from Crystal)
timecard.tinvoice = ledger.linvoice AND
timecard.tmatter = matter.mmatter AND
timecard.ttk = timekeep.tkinit AND
ledger.lindex = ledgfee.lindex AND
period_yymm.pe = ledger.lperiod AND
((period_yymm.p_yymm>= pd_start And
period_yymm.p_yymm <= pd_end) AND
(ledger.llcode In ('PAY','PAY-LEG','WOFF')) AND
(ledgfee.lfindex Not In (1776,1777,1778,1779,1780,1781)))
Hopefully this makes sense to you. Thank you.