For some crazy reason I can't seem to wrap my head around this seemingly simple task.
I have a report based on a set. The set consists of a Parent Table which lists Fire Incidents, Locations, Dates, etc.
That table is linked to a child table consisting of "ApparatusTypes" (vehicles) responding to that incident.
The last child table is called "Personnel Responding" and is linked to the ApparatusTypes table.
A typical record would consist of a DATE, an APPARATUS TYPE, and SEVERAL PERSONNEL:
04/12/2010
ENGINE 20
Smith = 1
Jones = 1
Wilson = 1
Hargrove = 1
Total Personnel on this ApparatusType (vehicle) = 4
(Names are actually hidden on the report)
Each person on a vehicle has a field with a value of "1," and on the report I have a calculated field that totals the number of personnel per vehicle, per incident.
Now here's my problem: I need to filter the report to only show incidents (dates) where the number of personnel per ApparatusType (vehicle) is LESS THAN 4, and I can't figure out how to write the filter expression.
The total number of personnel per ApparatusType is figured in the following expession:
and I assume I somehow need to figure that into the filter expression, but for the life of me I can't figure out how.
Any enlightenment would be appreciated.
(A sample report is included but not filtered.)
I have a report based on a set. The set consists of a Parent Table which lists Fire Incidents, Locations, Dates, etc.
That table is linked to a child table consisting of "ApparatusTypes" (vehicles) responding to that incident.
The last child table is called "Personnel Responding" and is linked to the ApparatusTypes table.
A typical record would consist of a DATE, an APPARATUS TYPE, and SEVERAL PERSONNEL:
04/12/2010
ENGINE 20
Smith = 1
Jones = 1
Wilson = 1
Hargrove = 1
Total Personnel on this ApparatusType (vehicle) = 4
(Names are actually hidden on the report)
Each person on a vehicle has a field with a value of "1," and on the report I have a calculated field that totals the number of personnel per vehicle, per incident.
Now here's my problem: I need to filter the report to only show incidents (dates) where the number of personnel per ApparatusType (vehicle) is LESS THAN 4, and I can't figure out how to write the filter expression.
The total number of personnel per ApparatusType is figured in the following expession:
total(Personnelresp->Personnel_Count,grp->ApparatusType,grp->Detail)
Any enlightenment would be appreciated.
(A sample report is included but not filtered.)
Comment