You can do this either by grouping your data to support these counts naturally at each group footer level
or
do this in a crosstab
or
you can use Running Totals or variables to do this
or a combination of the grouping and RT/variables.
RTs and variables are very similar and you can do conditional inclusion of rows for to count or SUM.
Since you want to show each doctor and an inclusion of their info in the report footer I would use a crosstab.
You will need to create a formula that determines if a row is to be counted or not and then use that to SUM on. The formula would probably be something like:
if table.datefield in begindate to enddate and table.procedure=procedure type then 1 else 0.
Edited by DBlank - 30 Jun 2009 at 6:58am