CutAndPaste
Registered User.
- Local time
- Today, 04:52
- Joined
- Jul 16, 2001
- Messages
- 60
I'm trying to count the numbers of Rooms at any given Grouping level on a report, so there's so many rooms in a building, so many in a groups of buildings and so many groups of buildings in each region.
To count the rooms in a building I've got a text box in the room header, RmCount. Set the control value to "=1". with a running count over the group.
I've got a text box in your building footer, RmTotal. Set to "=[RmCount]". This all works fne counting the rooms in a building.
However, if I try to use the same method for the other grouping levels, the higher levels are NOT counting the room numbers properly, but carrying them forward and adding them over the whole report. I've tried every combination of "running sum" yes/no and "over all" and "over Group" but can't get it to work.
I'm still having trouble getting an accurate count of the rooms in each Building Group and in each Region
I can get the sum for each building using the method described above but it all seems to fall apart when I try to use this method for higher levels of grouping. What I'm aiming for is something like the below - but in this example I've not put in the the occupations of each room - they may just have 1 occupation during the whole time or several, so I need to count the number and length of each of the occupancies (can't be more than a 365 days per single room!) .
The report is based on a query that supplies all of the required information (but has a row for each occupation). The report is dynamically sorted/grouped based on a value in a dropdown combo so there are no "fixed" field name sort levels. and there is calso code that hides/shows the differnent grouping levels as the user wants to choos bnetween a regional, building group and building summaries (not sure if this has any bearing on the calculations but it's in the mix anyway..)
Help greatly appreciated on this...
Would it work better if the individual room occupancies were based on sub-reports? just a thought...
Thanks,
Simon
To count the rooms in a building I've got a text box in the room header, RmCount. Set the control value to "=1". with a running count over the group.
I've got a text box in your building footer, RmTotal. Set to "=[RmCount]". This all works fne counting the rooms in a building.
However, if I try to use the same method for the other grouping levels, the higher levels are NOT counting the room numbers properly, but carrying them forward and adding them over the whole report. I've tried every combination of "running sum" yes/no and "over all" and "over Group" but can't get it to work.
I'm still having trouble getting an accurate count of the rooms in each Building Group and in each Region
I can get the sum for each building using the method described above but it all seems to fall apart when I try to use this method for higher levels of grouping. What I'm aiming for is something like the below - but in this example I've not put in the the occupations of each room - they may just have 1 occupation during the whole time or several, so I need to count the number and length of each of the occupancies (can't be more than a 365 days per single room!) .
The report is based on a query that supplies all of the required information (but has a row for each occupation). The report is dynamically sorted/grouped based on a value in a dropdown combo so there are no "fixed" field name sort levels. and there is calso code that hides/shows the differnent grouping levels as the user wants to choos bnetween a regional, building group and building summaries (not sure if this has any bearing on the calculations but it's in the mix anyway..)
Code:
[b]North Region[/b]
Building Group A
BuildingA1
Room1
Room2
Room3
SubTotal Building A1 = 3 Rooms
BuildingA2
Room1
Room2
Room3
Room4
SubTotal Building A2 = 4 Rooms
SubTotal Building Group A = 7 Rooms
Building Group B
BuildingB1
Room1
Room2
SubTotal Building B1 = 2 Rooms
BuildingB2
Room1
Room2
Room3
Room4
SubTotal Building B2 = 4 Rooms
SubTotal Building Group B = 6 Rooms
[b]Sub Total North Region = 13 Rooms[/b]
then .... South, East & West Regions etc..
Grand total All Rooms = Sum of all region totals
Help greatly appreciated on this...
Would it work better if the individual room occupancies were based on sub-reports? just a thought...
Thanks,
Simon
Last edited: