Class Wise Sum in Report (Crosstab Query) (1 Viewer)

Akhlaq.bkr

New member
Local time
Tomorrow, 03:29
Joined
Feb 25, 2021
Messages
5
Hi Dear Sir,

I have create a report from a crosstab query that works perfect now I want to sum of these fields (class wise) in text box using formula. Kindly help me in this regard. Thanks

Note: Details are on attachment.
 

Attachments

  • Access Help.JPG
    2.5 MB · Views: 93

MajP

You've got your good things, and you've got mine.
Local time
Today, 18:29
Joined
May 21, 2018
Messages
8,525
Since crosstab query transposes the data, I would think you go back to the original source. And either show that as another subreport.
Do an aggregate query on the original data and group by class. That should give you a table like

5th 4700
6th 14400
...
11th

If you wanted you could do a xtab on that and get

5th 6th
4700 14400
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 06:29
Joined
May 7, 2009
Messages
19,229
you can also use DSum() function in your report:

say for "Total of class 5th:"
add an Unbound textbox (to the right of "Total of class 5th") (name it txt5thTotal)
on its ControlSource property:

=DSum("theFieldToSum", "yourTableName", "Active_Class = '5th'")
 

Akhlaq.bkr

New member
Local time
Tomorrow, 03:29
Joined
Feb 25, 2021
Messages
5
you can also use DSum() function in your report:

say for "Total of class 5th:"
add an Unbound textbox (to the right of "Total of class 5th") (name it txt5thTotal)
on its ControlSource property:

=DSum("theFieldToSum", "yourTableName", "Active_Class = '5th'")
Thanks for answer but problem not solved yet. Kindly tell me any other way.
 

Akhlaq.bkr

New member
Local time
Tomorrow, 03:29
Joined
Feb 25, 2021
Messages
5
you can also use DSum() function in your report:

say for "Total of class 5th:"
add an Unbound textbox (to the right of "Total of class 5th") (name it txt5thTotal)
on its ControlSource property:

=DSum("theFieldToSum", "yourTableName", "Active_Class = '5th'")
Thank you I will try this method.
 

Akhlaq.bkr

New member
Local time
Tomorrow, 03:29
Joined
Feb 25, 2021
Messages
5
Since crosstab query transposes the data, I would think you go back to the original source. And either show that as another subreport.
Do an aggregate query on the original data and group by class. That should give you a table like

5th 4700
6th 14400
...
11th

If you wanted you could do a xtab on that and get

5th 6th
4700 14400
Thank you I will try this method.
 

Users who are viewing this thread

Top Bottom