Skip to Content
0
Former Member
Apr 25, 2007 at 03:00 AM

Custom Subtotals

48 Views

Hi there

I am new to Crystal Reports and am struggling on my first report, so any help would be much appreciated.

I have created a report with grouping levels. I have got my subtotals in for each group.

I would however like to subtotal a field based on a condition. I would like to split my total hours up into "working hrs" and "non-working hrs" and do this for each area - which I have already grouped by. the sql is

SELECT SUM(Hrs)

FROM PROJECT_LEDGER

WHERE (A01 = N'basic rate') OR

(A01 = N'Bank Hol')

I would like this sql statement though to apply to each group rather than all the records in the database.

I don't know whether I need a formula, or an sql statement etc.

Many thanks

Amanda