Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

filtering reports

Status
Not open for further replies.

CathieF

Technical User
Jan 18, 2002
8
US
I have created reports that calculate various counts, averages and standard deviations of data. These reports do not have a specific record source. I need to filter this data based on criteria that is not directly related to the calculated fields. Is there a way to do this in general for the report(rather than going into each individual DCount or DAvg and doing it there). I can't seem to get the Report Filter to make the calculated values change.
 
I'm afraid what you want won't work. All the built-in filtering works by setting the Filter property, but the Filter property has no effect if the RecordSource is blank. You'll have to adjust the criteria arguments of your database aggregate functions. Rick Sprague
 
Rick-

So what if I change it to have a record source. BUt I still use those agregate functions. Will it work or does the criteria in those functions override the filter?
Cathie
 
It seems to me that it will work provided you put the aggregate functions into the form footer, and if their arguments are fields from the record source.

The filter would work by eliminating unwanted records from the record source, so to make the filter apply to your aggregate functions, they have to get their data from the record source, too. You'd do that by naming the record source fields as the aggregate functions' arguments. Actually, I think the fields have to be in bound controls for this to work, and it's the control names you use as the function arguments. Then, the controls that display the aggregate function values have to be in the form footer in order to aggregate their values from the entire filtered record source. If you put them in the detail, they'll be calculated for the current record only. Rick Sprague
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top