By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,241 Members | 775 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,241 IT Pros & Developers. It's quick & easy.

Group Total in Report - What am I doing wrong.

P: n/a
Hi,

I haven't used access reports much. I have a problem in getting the
total of a group.

I have 3 fields, ProgName (Program name), Pname (Participant's name)
and PCategory (Participant category)

PCategory can have values 'SC', 'ST' and 'Others'

I need to get a table like below

Program Name SC
ST Others Total
----------------------
------ ----- ----------
--------
Program 1
5 2 8 15
Program 2
0 1 10 11
..
..
So (for example) to get the total for Others for each program I have
done as follows. I have put a text box 'txtOthers' in the detail
section for which the control source is:
Iif([PCategory]="Others",1,0)
I have grouped the report with ProgName and in the ProgName footer I
put a text box ' GTOthers' which has the control source
'=Sum([txtOthers])'

When I run the report, a pop up window appears saying "Enter Parameter
Value - txtOthers"

I trird changing it to =Sum([Report_Category!txtOthers]) where
'Catehory' is the name of the Report. Same problem.

I can't understand what exactly I am doing wrong.

The following things work:

If I change the control source of GTOthers to '=[txtOthers]' then no
error appears. Of course it just shows the last value of txtOthers

I put a textbox in the ProgName footer with control source
'=Count([Pname])' for getting the total number of participants. It
works correctly

Would apprecite any help

Sunil Korah

Feb 2 '07 #1
Share this Question
Share on Google+
7 Replies


P: n/a
On Feb 2, 9:43 am, "Sunil Korah" <kor...@gmail.comwrote:
Hi,

I haven't used access reports much. I have a problem in getting the
total of a group.

I have 3 fields, ProgName (Program name), Pname (Participant's name)
and PCategory (Participant category)

PCategory can have values 'SC', 'ST' and 'Others'

I need to get a table like below

Program Name SC
ST Others Total
----------------------
------ ----- ----------
--------
Program 1
5 2 8 15
Program 2
0 1 10 11
.
.
So (for example) to get the total for Others for each program I have
done as follows. I have put a text box 'txtOthers' in the detail
section for which the control source is:
Iif([PCategory]="Others",1,0)
I have grouped the report with ProgName and in the ProgName footer I
put a text box ' GTOthers' which has the control source
'=Sum([txtOthers])'

When I run the report, a pop up window appears saying "Enter Parameter
Value - txtOthers"

I trird changing it to =Sum([Report_Category!txtOthers]) where
'Catehory' is the name of the Report. Same problem.

I can't understand what exactly I am doing wrong.

The following things work:

If I change the control source of GTOthers to '=[txtOthers]' then no
error appears. Of course it just shows the last value of txtOthers

I put a textbox in the ProgName footer with control source
'=Count([Pname])' for getting the total number of participants. It
works correctly

Would apprecite any help

Sunil Korah
Sunil:

You cannot (TTBOMK) sum up the values of calculated fields on a
report. You have two options:
1. Add this as a calculated field to your underlying query:
isOthers: Iif([PCategory]="Others",1,0)
Then you can place a field on your report whose Control Source is
=Sum([isOthers])

2. Add a field to your report with the following properties:
Control Source: Iif([PCategory]="Others",1,0)
Name: txtOthersCount
Running Sum: Over All (or Over Group if that's what you need)
Visible: No
Then you can place a visible field where you're wanting to display the
total whose Control Source is =[txtOthersCount].

If at all possible, method 1 is the better way to go, especially if
you need to do other calcluations on your results.

HTH,
Jana

Feb 2 '07 #2

P: n/a
On Feb 2, 2:47 pm, "Jana" <Bauer.J...@gmail.comwrote:
Sunil:

You cannot (TTBOMK) sum up the values of calculated fields on a
report. You have two options:
1. Add this as a calculated field to your underlying query:
isOthers: Iif([PCategory]="Others",1,0)
Then you can place a field on your report whose Control Source is
=Sum([isOthers])
TTBOMK, I have done that before. If the control has a name that is
different than the field I think you can Sum the name of the control.
I haven't tried it lately though.

James A. Fortune
CD********@FortuneJames.com

Feb 2 '07 #3

P: n/a
Jana,

Thanks.

Your first option worked. The second did not

Regards

Sunil Korah
On Feb 3, 12:47 am, "Jana" <Bauer.J...@gmail.comwrote:
On Feb 2, 9:43 am, "Sunil Korah" <kor...@gmail.comwrote:
Hi,
I haven't used access reports much. I have a problem in getting the
total of a group.
I have 3 fields, ProgName (Program name), Pname (Participant's name)
and PCategory (Participant category)
PCategory can have values 'SC', 'ST' and 'Others'
I need to get a table like below
Program Name SC
ST Others Total
----------------------
------ ----- ----------
--------
Program 1
5 2 8 15
Program 2
0 1 10 11
.
.
So (for example) to get the total for Others for each program I have
done as follows. I have put a text box 'txtOthers' in the detail
section for which the control source is:
Iif([PCategory]="Others",1,0)
I have grouped the report with ProgName and in the ProgName footer I
put a text box ' GTOthers' which has the control source
'=Sum([txtOthers])'
When I run the report, a pop up window appears saying "Enter Parameter
Value - txtOthers"
I trird changing it to =Sum([Report_Category!txtOthers]) where
'Catehory' is the name of the Report. Same problem.
I can't understand what exactly I am doing wrong.
The following things work:
If I change the control source of GTOthers to '=[txtOthers]' then no
error appears. Of course it just shows the last value of txtOthers
I put a textbox in the ProgName footer with control source
'=Count([Pname])' for getting the total number of participants. It
works correctly
Would apprecite any help
Sunil Korah

Sunil:

You cannot (TTBOMK) sum up the values of calculated fields on a
report. You have two options:
1. Add this as a calculated field to your underlying query:
isOthers: Iif([PCategory]="Others",1,0)
Then you can place a field on your report whose Control Source is
=Sum([isOthers])

2. Add a field to your report with the following properties:
Control Source: Iif([PCategory]="Others",1,0)
Name: txtOthersCount
Running Sum: Over All (or Over Group if that's what you need)
Visible: No
Then you can place a visible field where you're wanting to display the
total whose Control Source is =[txtOthersCount].

If at all possible, method 1 is the better way to go, especially if
you need to do other calcluations on your results.

HTH,
Jana

Feb 5 '07 #4

P: n/a
On Feb 5, 8:31 am, "Sunil Korah" <kor...@gmail.comwrote:
Jana,

Thanks.

Your first option worked. The second did not

Regards

Sunil Korah

On Feb 3, 12:47 am, "Jana" <Bauer.J...@gmail.comwrote:
On Feb 2, 9:43 am, "Sunil Korah" <kor...@gmail.comwrote:
Hi,
I haven't used access reports much. I have a problem in getting the
total of a group.
I have 3 fields, ProgName (Program name), Pname (Participant's name)
and PCategory (Participant category)
PCategory can have values 'SC', 'ST' and 'Others'
I need to get a table like below
Program Name SC
ST Others Total
----------------------
------ ----- ----------
--------
Program 1
5 2 8 15
Program 2
0 1 10 11
.
.
So (for example) to get the total for Others for each program I have
done as follows. I have put a text box 'txtOthers' in the detail
section for which the control source is:
Iif([PCategory]="Others",1,0)
I have grouped the report with ProgName and in the ProgName footer I
put a text box ' GTOthers' which has the control source
'=Sum([txtOthers])'
When I run the report, a pop up window appears saying "Enter Parameter
Value - txtOthers"
I trird changing it to =Sum([Report_Category!txtOthers]) where
'Catehory' is the name of the Report. Same problem.
I can't understand what exactly I am doing wrong.
The following things work:
If I change the control source of GTOthers to '=[txtOthers]' then no
error appears. Of course it just shows the last value of txtOthers
I put a textbox in the ProgName footer with control source
'=Count([Pname])' for getting the total number of participants. It
works correctly
Would apprecite any help
Sunil Korah
Sunil:
You cannot (TTBOMK) sum up the values of calculated fields on a
report. You have two options:
1. Add this as a calculated field to your underlying query:
isOthers: Iif([PCategory]="Others",1,0)
Then you can place a field on your report whose Control Source is
=Sum([isOthers])
2. Add a field to your report with the following properties:
Control Source: Iif([PCategory]="Others",1,0)
Name: txtOthersCount
Running Sum: Over All (or Over Group if that's what you need)
Visible: No
Then you can place a visible field where you're wanting to display the
total whose Control Source is =[txtOthersCount].
If at all possible, method 1 is the better way to go, especially if
you need to do other calcluations on your results.
HTH,
Jana- Hide quoted text -

- Show quoted text -
Sunil:

Glad I could help!

James:

It's possible it works in future releases, but I've never been able to
get it to work in '97, no matter what I named the text box.

Jana

Feb 5 '07 #5

P: n/a
On Feb 5, 10:47 am, "Jana" <Bauer.J...@gmail.comwrote:
On Feb 5, 8:31 am, "Sunil Korah" <kor...@gmail.comwrote:


Jana,
Thanks.
Your first option worked. The second did not
Regards
Sunil Korah
On Feb 3, 12:47 am, "Jana" <Bauer.J...@gmail.comwrote:
On Feb 2, 9:43 am, "Sunil Korah" <kor...@gmail.comwrote:
Hi,
I haven't used access reports much. I have a problem in getting the
total of a group.
I have 3 fields, ProgName (Program name), Pname (Participant's name)
and PCategory (Participant category)
PCategory can have values 'SC', 'ST' and 'Others'
I need to get a table like below
Program Name SC
ST Others Total
----------------------
------ ----- ----------
--------
Program 1
5 2 8 15
Program 2
0 1 10 11
.
.
So (for example) to get the total for Others for each program I have
done as follows. I have put a text box 'txtOthers' in the detail
section for which the control source is:
Iif([PCategory]="Others",1,0)
I have grouped the report with ProgName and in the ProgName footer I
put a text box ' GTOthers' which has the control source
'=Sum([txtOthers])'
When I run the report, a pop up window appears saying "Enter Parameter
Value - txtOthers"
I trird changing it to =Sum([Report_Category!txtOthers]) where
'Catehory' is the name of the Report. Same problem.
I can't understand what exactly I am doing wrong.
The following things work:
If I change the control source of GTOthers to '=[txtOthers]' then no
error appears. Of course it just shows the last value of txtOthers
I put a textbox in the ProgName footer with control source
'=Count([Pname])' for getting the total number of participants. It
works correctly
Would apprecite any help
Sunil Korah
Sunil:
You cannot (TTBOMK) sum up the values of calculated fields on a
report. You have two options:
1. Add this as a calculated field to your underlying query:
isOthers: Iif([PCategory]="Others",1,0)
Then you can place a field on your report whose Control Source is
=Sum([isOthers])
2. Add a field to your report with the following properties:
Control Source: Iif([PCategory]="Others",1,0)
Name: txtOthersCount
Running Sum: Over All (or Over Group if that's what you need)
Visible: No
Then you can place a visible field where you're wanting to display the
total whose Control Source is =[txtOthersCount].
If at all possible, method 1 is the better way to go, especially if
you need to do other calcluations on your results.
HTH,
Jana- Hide quoted text -
- Show quoted text -

Sunil:

Glad I could help!

James:

It's possible it works in future releases, but I've never been able to
get it to work in '97, no matter what I named the text box.

Jana- Hide quoted text -

- Show quoted text -
Perhaps it was with A2K. I'll have to try some experiments. I've
always worked around the problem in A97 so I haven't had to try using
the text box names method. Did you solve your problem completely?

James A. Fortune
CD********@FortuneJames.com

Feb 6 '07 #6

P: n/a
On Feb 5, 9:45 pm, CDMAPos...@FortuneJames.com wrote:
On Feb 5, 10:47 am, "Jana" <Bauer.J...@gmail.comwrote:


On Feb 5, 8:31 am, "Sunil Korah" <kor...@gmail.comwrote:
Jana,
Thanks.
Your first option worked. The second did not
Regards
Sunil Korah
On Feb 3, 12:47 am, "Jana" <Bauer.J...@gmail.comwrote:
On Feb 2, 9:43 am, "Sunil Korah" <kor...@gmail.comwrote:
Hi,
I haven't used access reports much. I have a problem in getting the
total of a group.
I have 3 fields, ProgName (Program name), Pname (Participant's name)
and PCategory (Participant category)
PCategory can have values 'SC', 'ST' and 'Others'
I need to get a table like below
Program Name SC
ST Others Total
----------------------
------ ----- ----------
--------
Program 1
5 2 8 15
Program 2
0 1 10 11
.
.
So (for example) to get the total for Others for each program I have
done as follows. I have put a text box 'txtOthers' in the detail
section for which the control source is:
Iif([PCategory]="Others",1,0)
I have grouped the report with ProgName and in the ProgName footer I
put a text box ' GTOthers' which has the control source
'=Sum([txtOthers])'
When I run the report, a pop up window appears saying "Enter Parameter
Value - txtOthers"
I trird changing it to =Sum([Report_Category!txtOthers]) where
'Catehory' is the name of the Report. Same problem.
I can't understand what exactly I am doing wrong.
The following things work:
If I change the control source of GTOthers to '=[txtOthers]' then no
error appears. Of course it just shows the last value of txtOthers
I put a textbox in the ProgName footer with control source
'=Count([Pname])' for getting the total number of participants. It
works correctly
Would apprecite any help
Sunil Korah
Sunil:
You cannot (TTBOMK) sum up the values of calculated fields on a
report. You have two options:
1. Add this as a calculated field to your underlying query:
isOthers: Iif([PCategory]="Others",1,0)
Then you can place a field on your report whose Control Source is
=Sum([isOthers])
2. Add a field to your report with the following properties:
Control Source: Iif([PCategory]="Others",1,0)
Name: txtOthersCount
Running Sum: Over All (or Over Group if that's what you need)
Visible: No
Then you can place a visible field where you're wanting to display the
total whose Control Source is =[txtOthersCount].
If at all possible, method 1 is the better way to go, especially if
you need to do other calcluations on your results.
HTH,
Jana- Hide quoted text -
- Show quoted text -
Sunil:
Glad I could help!
James:
It's possible it works in future releases, but I've never been able to
get it to work in '97, no matter what I named the text box.
Jana- Hide quoted text -
- Show quoted text -

Perhaps it was with A2K. I'll have to try some experiments. I've
always worked around the problem in A97 so I haven't had to try using
the text box names method. Did you solve your problem completely?

James A. Fortune
CDMAPos...@FortuneJames.com- Hide quoted text -

- Show quoted text -
James:

I have always just worked around the issue in A97, so no problems
here :-)

Jana

Feb 6 '07 #7

P: n/a
On Feb 6, 10:57 am, "Jana" <Bauer.J...@gmail.comwrote:
James:

I have always just worked around the issue in A97, so no problems
here :-)

Jana
Sorry Jana. A confusion wave must have passed through here last night
about the time of my post.

James A. Fortune
CD********@FortuneJames.com

Feb 6 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.