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

Sub-Total within a group

Status
Not open for further replies.

fryguy5049

Technical User
Apr 20, 2004
24
0
0
US
Using CR 10 & MySQL. Currently I have a group that is sorted on a formula (@acct). @acct has numerous if statements to group on. e.g.
else if {trial_bal.acct} in [4103 to 4155] then
"Late Charge Income-Retail Lines of Credit"
The problem is every so often I need a sub-total, for example after the if statement listed above I would like a line that totaled accounts 1000-5000. This needs to be done several times throughout the report. What is the best method? Here is a sample of my data:
ACCT AMT DATE
1000 53 08/01/2004
1200 11 08/01/2004
1000 43 08/02/2004
2000 56 08/01/2004
2000 33 08/02/2004
3000 88 08/01/2004
3000 99 08/02/2004
Here is what the report looks like:
today(date) yesterday(date) variance
Operating Expense
Salaries (acct 7000-7006) $1000 $1500 $(500)
Mktg. Expense (acct 7007) $45,000 $43,000 $2000
Total Operating Expense $46,000 $44,500 $1500

thanks
 
Create another group to wrap around your current group with the appropriate hierarchial IF statements, as in:

if {trial_bal.acct} in [1000 to 5000] then
"Outer Grouping text"

-k

 
I guess I don't follow you. If I create another group it prints a totals line for each line in the first group. I just want one line after group one to show a subtotal.
 
I had a look at this post because it sounds like something I was trying to do a few weeks back, bust is all your trying to do is place a summary in the group footer?

Excuse my ignorance if i'm off. I do expect a barage of tut's

F
 
You can use conditional suppression for any groups that you don't want to display, or that you do by using NOT().

Groups don't have to print totals.

I guess I misunderstood your post as it uses text to describe requirements rather that example data and expected output.

"The problem is every so often I need a sub-total, for example after the if statement listed above I would like a line that totaled accounts 1000-5000. This needs to be done several times throughout the report. What is the best method? Here is a sample of my data:"

What does every so often mean?

If you only want it printed once after some group, then what does "This needs to be done several times throughout the report." mean?

-k
 
If you don't want to insert groups, you could try using running totals or conditional formulas. Let's say your group is on accounts 1000 - 5000, but you want a subtotal for accounts 3000,3001,and 3003 in the group footer. You could create a formula:

if {table.acct} in [3000,3001,3003] then {table.amt}

Then right click on this formula and insert a summary.

Or, you can use the running total editor and choose {table.amt},sum, evaluate based on a formula:

{table.acct} in [3000,3001,3003]

Reset on change of group. The running total must be placed in the group footer to work properly.

Your post was a little confusing. In your very first example, you referenced accounts in the range 4103 - 4155 and then said you wanted to show a subtotal for accounts through 5000, which would not have been included in that group. A subtotal or running total within a group will only summarize those accounts included in the group.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top