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!

Total for selected column 1

Status
Not open for further replies.

ZoomerZ

MIS
Jul 15, 2004
230
US
Hi!
Is there way to insert Total into Access Report for selected columns?
Should that be a formula?

Thanks
 
ZoomerZ
Try putting an unbound text box in the report footer, with the control source being
=Sum([YourFieldThatIsInColumn1])

and do the same for each column you want totalled.

If you are doing sorting and grouping, you could also put this expression in an unbound text box in the grouping footer.

Tom
 
Thanks, how can I calculate id field is Text.

I need to calculate by parameter. I have a grouping footer and I am inserting your formula into it so it will count rows.
Every row is 1. I need Number of rows per group.

Thanks
 
ZoomerZ
Try using Count rather than Sum in the expression.

Tom
 
Sending my love to THW...I am so DONE with pretty Report, thanks to you...
 
I just found a glitch in my Report.

My first group has 17 records and my formukla says 17
My second group has 1 record and formula says 18 (should say 1)
My third group has 1 records and formula says 19 (should say 1)

I hope it is simple...THANKS
 
I need a little more information.

There must be some way to differentiate among the 3 groups. What are the groups? Can you give me the names of the controls in the groups?

Tom
 
Sure...

every group has a footer/header
------------------------------------------
Executives BusinessUnit CostCenter
text text text
-------------------------------------------
Bieler Garry 2Grt Unique01
Unique02
Unique03
SubTotal BusinessUnits:1 CostCenters:3

3Grt Uniq01
Uniq02

SubTotal BusinessUnits:1 CostCenters:2
Total BusinessUnits:2 CostCenters:5


I hope it is more clear now. Thanks so much


 
So what is it that isn't totally correctly?

The totals in the group footers, or the Totals in the report footer?

In your example you gave, what doesn't work?

Tom
 
See, I don't want running total, I want like in my example.
Instead I am getting

------------------------------------------
Executives BusinessUnit CostCenter
text text text
-------------------------------------------
Bieler Garry 2Grt Unique01
Unique02
Unique03
SubTotal BusinessUnits:1 CostCenters:3

3Grt Uniq01
Uniq02

SubTotal BusinessUnits:2 CostCenters:5
(should be 1) (should be 2)

Thanks
 
Sorry to belabour this, but are you grouping first by Executives, and then secondly by Business Units?

Tom
 
No, BusinessUnit and Cost Center...
I tried but when posted format went off sorry

I am writing some IIFs to see what I can do, thanks for helping me. I need to show on Monday. Thanks
 
I wrote in text boxes =IIf(IsNull(Count([Business Unit])),"",(Format(CStr(Count([Business Unit ])))))

and it seems working

Please, look at and tell me if it seems legit function

I will still want your input Thanks
 
I just made up a little table and plugged in the values you provided.

Then in the report, I did the first grouping on Business Unit, with both a Header and Footer. Then I did a second grouping on Cost Centre but NO Header and NO Footer.

This was the result...
Executives Business Unit Cost Center
Bieler Gary 2Grt Unique01
Unique02
Unique03
CostCenters: 3

3Grt Unique01
Unique02
CostCenters: 2

Now, I probably don't have the table designed the way you have it, so if I try to count Business Units, I get multiples (a count of three 2Grt, and a count of two 3Grt) but I think changing the grouping will give you the result you need.

I haven't analyzed your IIf statement because I worked on this grouping.

See if this works for you.

Tom
 
and where did you placed boxes with calculation?
Can't make it work, gets me Running Total...
 
In the Business Unit footer, I put...
=Count([CostCenter])

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top