How to have total for each category in access report? (1 Viewer)

luzz

Registered User.
Local time
Today, 15:19
Joined
Aug 23, 2017
Messages
346
Hello guys, I have a access report whereby it contain KGS,NettWeight for each fabrication, i would like to have a total amount for each category in my access report, how can i do that?

For instance if there is two difference fabrication, KGS,Nettweight, my current total will only appear at the second fabrication which is the bottom part.
Whereas i want it to appear at the top and bottom if the PO contain more than one fabrication
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 06:19
Joined
May 7, 2009
Messages
19,229
firstly, you need to create a Total Query
that will group the PO.

on another column add an expression that will count
[KGS] field and [Net Weight]:

Count([KGS] & [Net Weight])

another column that will Sum the field
you need to Total:

Sum([FieldName])

on my sample (qryNmberOfDifferentFabInPO) i sum the [Net Weight] field.

design your report to add group on PO.

you need code on the detail format
to show:

1. if there are only two different
fabrication on same PO, put
the total (or subTotal?) next to the last record.

2. if 1 or more than 2, put the
total next to the first and last records.

see Detail_Format of sample report (Table1).

*******************************************************
(Note: the Detail_Format will only fire on Print Preview
and not on any other view of the report.
********************************************************
 

Attachments

  • aaDatabase9.zip
    30 KB · Views: 32

luzz

Registered User.
Local time
Today, 15:19
Joined
Aug 23, 2017
Messages
346
firstly, you need to create a Total Query
that will group the PO.

on another column add an expression that will count
[KGS] field and [Net Weight]:

Count([KGS] & [Net Weight])

another column that will Sum the field
you need to Total:

Sum([FieldName])

on my sample (qryNmberOfDifferentFabInPO) i sum the [Net Weight] field.

design your report to add group on PO.

you need code on the detail format
to show:

1. if there are only two different
fabrication on same PO, put
the total (or subTotal?) next to the last record.

2. if 1 or more than 2, put the
total next to the first and last records.

see Detail_Format of sample report (Table1).

*******************************************************
(Note: the Detail_Format will only fire on Print Preview
and not on any other view of the report.
********************************************************

Thankyou. I tried and could not get it. It come out error.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 06:19
Joined
May 7, 2009
Messages
19,229
Can u post a db with similar report, table and query
 

luzz

Registered User.
Local time
Today, 15:19
Joined
Aug 23, 2017
Messages
346
Can u post a db with similar report, table and query

I would love to. But i cant seem to be able to attached and upload my file. It shows" security token"
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 06:19
Joined
May 7, 2009
Messages
19,229
put it in a ZIP file.
 

Minty

AWF VIP
Local time
Today, 23:19
Joined
Jul 26, 2013
Messages
10,368
Have a look at the query and the report to see where you went wrong.
 

Attachments

  • Test.zip
    1.6 MB · Views: 46

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 06:19
Joined
May 7, 2009
Messages
19,229
see if this is what you need.
 

Attachments

  • aaTest(1).zip
    45.1 KB · Views: 40

luzz

Registered User.
Local time
Today, 15:19
Joined
Aug 23, 2017
Messages
346
see if this is what you need.

I attached a image which is my current report. The number in bold is my total. But thats not what i want. I want it the subtotal to be total up after the last color
 

Attachments

  • total.jpg
    total.jpg
    40.8 KB · Views: 63

isladogs

MVP / VIP
Local time
Today, 23:19
Joined
Jan 14, 2017
Messages
18,209
If you mean you want ONE overall total, place the total row in the report footer

EDIT - just spotted that Minty said that in post 2
 

Minty

AWF VIP
Local time
Today, 23:19
Joined
Jul 26, 2013
Messages
10,368
I'm pretty certain my zipped file has this - but have rather lost the will to keep helping with the lack of response / darting off in different directions.
 

luzz

Registered User.
Local time
Today, 15:19
Joined
Aug 23, 2017
Messages
346
If you mean you want ONE overall total, place the total row in the report footer

EDIT - just spotted that Minty said that in post 2

what minty said in post 2, i have done it previously and is not what i want, that's why i did not follow. What i want is having total for each fabrication instead of a total for all the different fabrication.
 

Minty

AWF VIP
Local time
Today, 23:19
Joined
Jul 26, 2013
Messages
10,368
Try this then - it has a total per PO.

If you had looked at what I had done it should have been pretty obvious what you needed to change in fairness.
 

Attachments

  • Test.accdb
    548 KB · Views: 69

Users who are viewing this thread

Top Bottom