473,385 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Group Total in Report - What am I doing wrong.

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
7 3634
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Paul | last post by:
HI! I have a script that does not seem to work. can someone tell me what I am doing wrong here? <script language="JavaScript"> function firefoxautofix(){ parent.window.resizeBy(-1,-1)...
2
by: Galina | last post by:
Hello I have a report, which lists records. Each record has money paid field. Money paid can be 0 or not 0. I calculate and print summary of money for a group in the group footer, as well as...
1
by: Pepa Cougar | last post by:
Hello, I'm writing a managed C++ wrapper for a legacy C++ code. I'm wrapping a script-compiler class, which uses a callback to report script errors back to the client. The callback prototype is...
2
by: Aaron Ackerman | last post by:
I cannot a row to this bound DataGrid to SAVE MY LIFE! I have tried everything and I am at a loss. The using goes into add mode with the add button adds his data then updates with the update...
8
MMcCarthy
by: MMcCarthy | last post by:
Interesting title isn't it. Ok everyone, I have a problem and I'm hoping some of you genius's have a solution. I have a Report which after being printed will have the pages run through an...
0
by: shapper | last post by:
Hello, I am creating a class with a control. I compiled the class and used it on an Asp.Net 2.0 web site page. I can see the begin and end tags of my control (<oland </ol>) but somehow the...
1
by: Nicko. | last post by:
Hi, I'm at my wits-end here. I'm a beginner with ASP/C# (using .NET 2003) and I'm trying to post variables from a classic ASP form to a ASP.NET form. The Classic ASP form was scripted with...
16
by: SirG | last post by:
I'm looking for an explanation of why one piece of code works and another does not. I have to warn you that this is the first piece of Javascript I've ever written, so if there is a better way or a...
10
by: DavidSeck.com | last post by:
Hi, I am working with the Facebook API right now, an I have kind of a problem, but I don't know what I am doing wrong. So I have a few arrays, f.ex.: User albums: array(2) {
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.