count won't work

R

rob p

Main report has count of 38. I have the count in the report footer. Fine.

Subreport (which I need to run in the report footer) is grouped by payee. It
could have multiple detail lines, I ONLY want to count the payee footers. In
the query column I have recordcount:(count(*)). In the payee footer I have
textfield1 with run sum set. Each footer increments by one. Fine. Report
footer has textfield2 with CS being the textfield1 in the payee footer. That
shows the correct amount of payee records. (4 in this case).

What I cannot do is get the 4 over the the main report to be added to the 38
count of of the main report. On the main footer I have a textfield3 with
=[subreport].Report![textfield2] or [textfield1]. Both return 1 not the 4.
What is wrong.

Basically I want to add the total of subreport footers to the count in the
main report.

Thanks much...
 
D

Duane Hookom

I would build the query(s) to calculate the value you want. Then add a
subreport based on this query.
 
R

rob p

The subreport is already looking at a query where I added a column with a
"count(*)" that is not working. It's showing up as 1 on the main report. I
don't get the additional subreport and how I could use it.

Another idea:
The query the subreport is based on has one field (to_whom) that could be
counted and that number passed to the main report would be the number I am
looking for.

Is there a way to count and pass something like this?

thanks.
rob



Duane Hookom said:
I would build the query(s) to calculate the value you want. Then add a
subreport based on this query.

--
Duane Hookom
MS Access MVP


rob p said:
Main report has count of 38. I have the count in the report footer. Fine.

Subreport (which I need to run in the report footer) is grouped by
payee.
It
could have multiple detail lines, I ONLY want to count the payee
footers.
In
the query column I have recordcount:(count(*)). In the payee footer I have
textfield1 with run sum set. Each footer increments by one. Fine. Report
footer has textfield2 with CS being the textfield1 in the payee footer. That
shows the correct amount of payee records. (4 in this case).

What I cannot do is get the 4 over the the main report to be added to
the
38
count of of the main report. On the main footer I have a textfield3 with
=[subreport].Report![textfield2] or [textfield1]. Both return 1 not the 4.
What is wrong.

Basically I want to add the total of subreport footers to the count in the
main report.

Thanks much...
 
D

Duane Hookom

Place a text box in the subreport footer
=Count(*)
Name it something significant and then place a text box in the main report
=subrpt.Report.SomethingSignificant

--
Duane Hookom
MS Access MVP


rob p said:
The subreport is already looking at a query where I added a column with a
"count(*)" that is not working. It's showing up as 1 on the main report. I
don't get the additional subreport and how I could use it.

Another idea:
The query the subreport is based on has one field (to_whom) that could be
counted and that number passed to the main report would be the number I am
looking for.

Is there a way to count and pass something like this?

thanks.
rob



Duane Hookom said:
I would build the query(s) to calculate the value you want. Then add a
subreport based on this query.

--
Duane Hookom
MS Access MVP


rob p said:
Main report has count of 38. I have the count in the report footer. Fine.

Subreport (which I need to run in the report footer) is grouped by
payee.
It
could have multiple detail lines, I ONLY want to count the payee
footers.
In
the query column I have recordcount:(count(*)). In the payee footer I have
textfield1 with run sum set. Each footer increments by one. Fine. Report
footer has textfield2 with CS being the textfield1 in the payee
footer.
That
shows the correct amount of payee records. (4 in this case).

What I cannot do is get the 4 over the the main report to be added to
the
38
count of of the main report. On the main footer I have a textfield3 with
=[subreport].Report![textfield2] or [textfield1]. Both return 1 not
the
 
R

rob p

Almost. (I like the simplicity). I can only have one detail record -
additional ones are also added to the count. I only want the amount of
subreport footers.
thanks.
Duane Hookom said:
Place a text box in the subreport footer
=Count(*)
Name it something significant and then place a text box in the main report
=subrpt.Report.SomethingSignificant

--
Duane Hookom
MS Access MVP


rob p said:
The subreport is already looking at a query where I added a column with a
"count(*)" that is not working. It's showing up as 1 on the main report. I
don't get the additional subreport and how I could use it.

Another idea:
The query the subreport is based on has one field (to_whom) that could be
counted and that number passed to the main report would be the number I am
looking for.

Is there a way to count and pass something like this?

thanks.
rob



Duane Hookom said:
I would build the query(s) to calculate the value you want. Then add a
subreport based on this query.

--
Duane Hookom
MS Access MVP


Main report has count of 38. I have the count in the report footer. Fine.

Subreport (which I need to run in the report footer) is grouped by payee.
It
could have multiple detail lines, I ONLY want to count the payee footers.
In
the query column I have recordcount:(count(*)). In the payee footer
I
have
textfield1 with run sum set. Each footer increments by one. Fine. Report
footer has textfield2 with CS being the textfield1 in the payee footer.
That
shows the correct amount of payee records. (4 in this case).

What I cannot do is get the 4 over the the main report to be added
to
the
38
count of of the main report. On the main footer I have a textfield3 with
=[subreport].Report![textfield2] or [textfield1]. Both return 1 not
the
4.
What is wrong.

Basically I want to add the total of subreport footers to the count
in
the
main report.

Thanks much...
 
D

Duane Hookom

If you want to count the groups from a subreport and add this total to the
main report:
1) Add a text box to the subreport group footer
Name: txtGroupCount
Control Source: =1
Running Sum: Over All
2) Add a text box to the subreport report footer
Name: txtSumGroupCount
Control Source: =txtGroupCount
3) add a text box to the main report
Control Source: srptYourSub.Report.txtSumGroupCount

--
Duane Hookom
MS Access MVP


rob p said:
Almost. (I like the simplicity). I can only have one detail record -
additional ones are also added to the count. I only want the amount of
subreport footers.
thanks.
Duane Hookom said:
Place a text box in the subreport footer
=Count(*)
Name it something significant and then place a text box in the main report
=subrpt.Report.SomethingSignificant
with
report.
I
footer
I
have
textfield1 with run sum set. Each footer increments by one. Fine. Report
footer has textfield2 with CS being the textfield1 in the payee footer.
That
shows the correct amount of payee records. (4 in this case).

What I cannot do is get the 4 over the the main report to be added to
the
38
count of of the main report. On the main footer I have a
textfield3
with
=[subreport].Report![textfield2] or [textfield1]. Both return 1
not
the
4.
What is wrong.

Basically I want to add the total of subreport footers to the
count
 
R

rob p

Duane, first of all thanks. Still have problems - though I can see why. The
subreport has data I need at the very end of the main report. Because of
that I need to place the subreport in the report footer. And because of that
the text box (also in the report footer) that is placed under the subreport
returns 1.

Duane Hookom said:
If you want to count the groups from a subreport and add this total to the
main report:
1) Add a text box to the subreport group footer
Name: txtGroupCount
Control Source: =1
Running Sum: Over All
2) Add a text box to the subreport report footer
Name: txtSumGroupCount
Control Source: =txtGroupCount
3) add a text box to the main report
Control Source: srptYourSub.Report.txtSumGroupCount

--
Duane Hookom
MS Access MVP


rob p said:
Almost. (I like the simplicity). I can only have one detail record -
additional ones are also added to the count. I only want the amount of
subreport footers.
thanks.
with report. could
be
number
add
a
subreport based on this query.

--
Duane Hookom
MS Access MVP


Main report has count of 38. I have the count in the report footer.
Fine.

Subreport (which I need to run in the report footer) is grouped by
payee.
It
could have multiple detail lines, I ONLY want to count the payee
footers.
In
the query column I have recordcount:(count(*)). In the payee
footer
I
have
textfield1 with run sum set. Each footer increments by one. Fine.
Report
footer has textfield2 with CS being the textfield1 in the payee
footer.
That
shows the correct amount of payee records. (4 in this case).

What I cannot do is get the 4 over the the main report to be
added
to
the
38
count of of the main report. On the main footer I have a textfield3
with
=[subreport].Report![textfield2] or [textfield1]. Both return 1 not
the
4.
What is wrong.

Basically I want to add the total of subreport footers to the
count
in
the
main report.

Thanks much...
 
D

Duane Hookom

If you have a total from a subreport displayed in a text box in a group
footer (or other section), you can try set a running sum on text box on the
main report. If the main report running sum text box is txtSumFromSub, you
can add a text box to the report footer with a control source of
=txtSumFromSub.

--
Duane Hookom
MS Access MVP


rob p said:
Duane, first of all thanks. Still have problems - though I can see why. The
subreport has data I need at the very end of the main report. Because of
that I need to place the subreport in the report footer. And because of that
the text box (also in the report footer) that is placed under the subreport
returns 1.

Duane Hookom said:
If you want to count the groups from a subreport and add this total to the
main report:
1) Add a text box to the subreport group footer
Name: txtGroupCount
Control Source: =1
Running Sum: Over All
2) Add a text box to the subreport report footer
Name: txtSumGroupCount
Control Source: =txtGroupCount
3) add a text box to the main report
Control Source: srptYourSub.Report.txtSumGroupCount

--
Duane Hookom
MS Access MVP


number add
grouped
by
payee.
It
could have multiple detail lines, I ONLY want to count the payee
footers.
In
the query column I have recordcount:(count(*)). In the payee footer
I
have
textfield1 with run sum set. Each footer increments by one. Fine.
Report
footer has textfield2 with CS being the textfield1 in the payee
footer.
That
shows the correct amount of payee records. (4 in this case).

What I cannot do is get the 4 over the the main report to be added
to
the
38
count of of the main report. On the main footer I have a textfield3
with
=[subreport].Report![textfield2] or [textfield1]. Both return
1
not
the
4.
What is wrong.

Basically I want to add the total of subreport footers to the count
in
the
main report.

Thanks much...
 
R

rob p

I tried. No luck. To me it seems the subreport can't be in the report footer
and work. I appreciate the help. Most of it for getting numbers from sub to
main will be used many times in other reports.

By the way, I figured out what I needed to do. I added a group called bogus
above the dept and check groups.. In the query I put in a column bogus=1. I
turned on footer for bogus group. I took subreport out of report footer and
put in bogus footer. (This is the last section before the report footer so
it is about where I need it.) Now the same text boxes work. It definitely
was the report footer.

Thanks.
rob

Duane Hookom said:
If you have a total from a subreport displayed in a text box in a group
footer (or other section), you can try set a running sum on text box on the
main report. If the main report running sum text box is txtSumFromSub, you
can add a text box to the report footer with a control source of
=txtSumFromSub.

--
Duane Hookom
MS Access MVP


rob p said:
Duane, first of all thanks. Still have problems - though I can see why. The
subreport has data I need at the very end of the main report. Because of
that I need to place the subreport in the report footer. And because of that
the text box (also in the report footer) that is placed under the subreport
returns 1.

Duane Hookom said:
If you want to count the groups from a subreport and add this total to the
main report:
1) Add a text box to the subreport group footer
Name: txtGroupCount
Control Source: =1
Running Sum: Over All
2) Add a text box to the subreport report footer
Name: txtSumGroupCount
Control Source: =txtGroupCount
3) add a text box to the main report
Control Source: srptYourSub.Report.txtSumGroupCount

--
Duane Hookom
MS Access MVP


Almost. (I like the simplicity). I can only have one detail record -
additional ones are also added to the count. I only want the amount of
subreport footers.
thanks.
Place a text box in the subreport footer
=Count(*)
Name it something significant and then place a text box in the main
report
=subrpt.Report.SomethingSignificant

--
Duane Hookom
MS Access MVP


The subreport is already looking at a query where I added a column
with
a
"count(*)" that is not working. It's showing up as 1 on the main
report.
I
don't get the additional subreport and how I could use it.

Another idea:
The query the subreport is based on has one field (to_whom) that could
be
counted and that number passed to the main report would be the number
I
am
looking for.

Is there a way to count and pass something like this?

thanks.
rob



I would build the query(s) to calculate the value you want.
Then
add
a
subreport based on this query.

--
Duane Hookom
MS Access MVP


Main report has count of 38. I have the count in the report
footer.
Fine.

Subreport (which I need to run in the report footer) is
grouped
by
payee.
It
could have multiple detail lines, I ONLY want to count the payee
footers.
In
the query column I have recordcount:(count(*)). In the payee
footer
I
have
textfield1 with run sum set. Each footer increments by one. Fine.
Report
footer has textfield2 with CS being the textfield1 in the payee
footer.
That
shows the correct amount of payee records. (4 in this case).

What I cannot do is get the 4 over the the main report to be added
to
the
38
count of of the main report. On the main footer I have a
textfield3
with
=[subreport].Report![textfield2] or [textfield1]. Both
return
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top