I already have one report that does something similar using the filter option of the report. The trouble that I've been experiencing with this particular one is that I need the summaries in crosstab format. The report fields won't change as you suggested above, but whether the user wants average turn times or counts for the days outstanding or number cases in a closed status is where I'm running into issues. It seems that loading a cross tab query and then trying to filter it from the report properties window doesn't yield the results for which I am looking. Here's sample of the query that I'd like to build. I'll add the variables later for grouping and such, but this thing has been wracking my brain for 3 days now.
Code:
Select Case Me.fraCommonRpts
Case 1
sqlSTMT = "TRANSFORM Avg(qry_Closed_Summary.DaysOutstanding) AS AvgOfDaysOutstanding SELECT qry_Closed_Summary.CompanyCode, Avg(qry_Closed_Summary.DaysOutstanding) AS [Total Of DaysOutstanding] FROM qry_Closed_Summary GROUP BY qry_Closed_Summary.CompanyCode PIVOT Format([ClosedDate],'mmm') In ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');"
DoCmd.RunSQL sqlSTMT
Case 2
Case 3
End Select