Displaying Total Count() in Main Form

amona

Registered User.
Local time
Today, 00:49
Joined
Jan 31, 2012
Messages
12
I built a database inventory for a UNVERSITY to keep track of facilities (PCs, Printers …)
Now I am working in reports:
I created a main report showing Building/College and Department/Major and a SubReport to display PCs in each department/Major with count of PCs
I am trying to find a way to calculate the count of PCs for each Building/College and then the total count of all PCs in the university to display in the Main Report.
I searched over the net to find similar case, but did not find.
Would anyone help, please?
 
Many Thanks for the quick replay,

The report is already grouped by Building/College and I did what you suggest:

Textbox with =Count(PC)

But it did not work, did not recognize PC because it is in the subReport, then I tried to reference it by

=Count(subReport.Report!PC)

Any suggestion, Please??
 
Count() works only on fields that exist in the current dataset. You can't perform a count on a field in a subreport from the main report.
 
Is there any way to make this happened???
 
I mentioned how in my first post plus the links I gave explains it all. It doesn't mention using subreports. You just need to group and count in the group's Footer section.
 

I have to use the sub report to count PCs for each Department/College and I need the main report to group by Building/College.
In the Footer of the main report I want show the count of PCs for each building.
Any suggestion??
 
Count in the subreport. That is put the count in the Footer section of your subreport and return that value to your main report like so:
Code:
=[SubReportControlName].[Report]![CountTextbox]
Get it working first but at a later stage you will need to apply extra conditions to cater for errors that will occur when the subreport has no data.
 

Users who are viewing this thread

Back
Top Bottom