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

Help with subtotal formula

Status
Not open for further replies.

tkaz

Technical User
Feb 21, 2005
75
US
CR XI
SQL

I have a report developed that has 4 entities in a group with group totals. I need to combine 2 of those entities into a subtotal.

EX: These are all in ONE of 3 Groups on the report...

Entity1 -
abc 10 This is at Group 3 Level
def 10
Entity1TTL 20

Entity 2
ghi 10
jkl 10
Entity2TTL 20
Entity 3
mno 10
pqr 10
Entity3TTL 20

Entity 4
stu 10
vwx 10
Entity4TTL 20

Entities 3& 4 Subtotal 40

Group Total 80


I am NOT good with variables at all and would need some help, but is there a way to declare a variable that would total those two entities for the subtotal? Or, should I use running totals?

Can you help me?

Thanks!
 
Just add an outer group that is based on a formula like this:

//{@outergrp}:
if {table.entity} in [1,2] then 1 else
if {table.entity in [3,4] then 2

Insert a group on this, and make it your group #1. You can suppress the group header and format the group footer to suppress using a formula like this:

{@outergrp} <> 2

Then just insert a summary at the {@outergrp} level.

-LB
 
DUH!!! I can't believe I was going about this the hardest way possible! I'm glad you are there to straighten me out:)

Thanks...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top