Count the number of records on a report

V

valeriea

I created 3 sub reports and combined them into one big report that prints
out. I am trying to get a count on the number of records in the report. I
tried to google to question and i get a response asking me to use =count(*).
That does not seem to be working for me. Any help will be greatly
appreciated.
 
A

Allen Browne

In the Report Footer section of the first subreport, place a text box with
these properties:
Control Source =Count("*")
Name txtCount
Format General Number.

Now on the main report, place a text box with this in its Control Source:
=IIf([Sub1].[Report].[HasData], [Sub1].[Report].[txtCount], 0)
using the name of your subreport control in place of Sub1.

Once you get that working, you can do the same for the other subreports.

Explanation of how that works:
Bring the total from a subreport back onto the main report
at:
http://allenbrowne.com/casu-18.html
 
V

valeriea

thank you Allen. I am getting an error on the report and will follow the
link to your site to try to see if that would correct the error.

Allen Browne said:
In the Report Footer section of the first subreport, place a text box with
these properties:
Control Source =Count("*")
Name txtCount
Format General Number.

Now on the main report, place a text box with this in its Control Source:
=IIf([Sub1].[Report].[HasData], [Sub1].[Report].[txtCount], 0)
using the name of your subreport control in place of Sub1.

Once you get that working, you can do the same for the other subreports.

Explanation of how that works:
Bring the total from a subreport back onto the main report
at:
http://allenbrowne.com/casu-18.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

valeriea said:
I created 3 sub reports and combined them into one big report that prints
out. I am trying to get a count on the number of records in the report.
I
tried to google to question and i get a response asking me to use
=count(*).
That does not seem to be working for me. Any help will be greatly
appreciated.
 

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