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

Subtotal Multiple Groups

Status
Not open for further replies.

ginaburg

Technical User
Jul 14, 2004
62
0
0
US
I am using Crystal version 11

I am trying to create a report that will subtotal multiple groups.

Exapmple

Fed Tax
FICA Tax
FUTA Tax
Subtotal

State TAx
SUI Tax
Subtotal

I'm not sure if this is the right approach but I created a group for each tax type and put all my fields in the Group Footer. This part works good. I can get a grand total in the report footer section but how do I get a subtotal for each tax section.

Or am I taking the wrong approach to this report. I would rather not do a subreport.


Thanks
Gina
 
create a formula

TaxGroup
if {db_taxtype} in ["Fed","FICA",FUTA"] then 1 // you could name it instead of number if you want. Ex "Tax Type 1"
else 2 //"Tax Type 2"

Group on that formula as Group 1 with the totals you need and your existing group as 2

OR
Is there another field in your table that denotes this grouping? If so ignore above and group on that field.

_____________________________________
Crystal Reports 2008 and XI
Intersystems Cache 2012 ODBC connection

 
i missed a " in my formula should read "FUTA" not FUTA"

_____________________________________
Crystal Reports 2008 and XI
Intersystems Cache 2012 ODBC connection

 
reading your post again .. change formula to

if {db_taxtype} in ["Fed","FICA","FUTA"] then "Fed Tax"
else "State Tax"

_____________________________________
Crystal Reports 2008 and XI
Intersystems Cache 2012 ODBC connection

 
That would work great, but I forgot to mention that each of these tax types are already a group conditioned to pull each tax type and total the detail. This would be the deduction of taxes for all employees for a given pay period.

Group 1 conditioned to Fed Tax EE Contribution Subject Wages
Group 2 conditioned to FICA Tax EE Contribution Subject Wages ER Contirbution Subject Wages
Group 3 conditioned to FUTA Tax ER Contirbution Subject Wages

Then I would need groups for each of the state taxes the same way.

But I still need to total each section Fed Tax and State Tax

I hope this makes sense.

So I am not sure how to alter the logic of your grouping.

Thanks
Gina
 
Hi Gina -

What do you mean by conditioned? You have created those three groups? What formula did you use to do that or did you group on a particular field? {db_taxtype} maybe?

_____________________________________
Crystal Reports 2008 and XI
Intersystems Cache 2012 ODBC connection

 
I just have a formula in the Supress (No-Drill down) in the Section Expert on each group
Group Footer 1a {bPRDT.EDLCode} <> 1 (1 being Fed Tax EE)
Group Footer 1b {bPRDT.EDLCode} <> 2 (2 being FICA Tax ER)

I have a different formula on each group to limit to a particular tax.

There is probably an easier way to do this but I'm not coming up with one.

Thanks
Gina
 
you can create formula like

@Fed Tax EE

If {bPRDT.EDLCode} = 1 then your amountfield else 0

Repeat for other tax types you can then do simple sum summaries on this formula for groups and report totals.

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top