Reporting Groups

  • Thread starter Thread starter PeterM
  • Start date Start date
P

PeterM

I have a very simple report based on a calendar database. The report
contains the date, start time, end time, appointment type and comments.

I need to order the report by date descending. Not a problem. What I would
like to do is to build a section at the end of the report summarizing the
hours and number of entries for each appointment type. For example:

Appointment Summary:
Doctor Visit 24 hours Occurrances: 12
Hospitilization 72 hours Occurrance: 1
Lab Visit 5 hours Occurrance: 9

Is this possible? Can someone please point me to a resource I can use to
build this type of report?

I appreciate the help!
 
Create a report based on a totals query the generates the values you want in
your report. Then add this new report to your calendar report as a subreport
in the main report footer section.

Duane Hookom
MS Access MVP
 
I have a very simple report based on a calendar database. The report
contains the date, start time, end time, appointment type and comments.

I need to order the report by date descending. Not a problem. What I would
like to do is to build a section at the end of the report summarizing the
hours and number of entries for each appointment type. For example:

Appointment Summary:
Doctor Visit 24 hours Occurrances: 12
Hospitilization 72 hours Occurrance: 1
Lab Visit 5 hours Occurrance: 9

Is this possible? Can someone please point me to a resource I can use to
build this type of report?

I appreciate the help!

A Subreport based on a Totals query would do the job. Create a query based on
the table; include the type, the primary key, and a calculated field by typing

Duration: DateDiff("n", [Start Time], [End Time])

Also include any fields that you want to use for criteria (e.g. the visit
date, or the start time if that includes the date).

Change it to a Totals query by clicking the Greek Sigma icon.

Leave the default Group By on the type; change it to Count on the primary key,
and to Sum on the time (which will be in minutes - divide by 60 to get hours
if you wish). Change the totals row to "Where" for the field or fields that
you want to use for search criteria, and put the criterion on the Criteria
line.

Base a Report on this query and include it as a subreport on the footer of
your main report.
 
Thanks guys! It took a little research but your solutions work well.

John W. Vinson said:
I have a very simple report based on a calendar database. The report
contains the date, start time, end time, appointment type and comments.

I need to order the report by date descending. Not a problem. What I would
like to do is to build a section at the end of the report summarizing the
hours and number of entries for each appointment type. For example:

Appointment Summary:
Doctor Visit 24 hours Occurrances: 12
Hospitilization 72 hours Occurrance: 1
Lab Visit 5 hours Occurrance: 9

Is this possible? Can someone please point me to a resource I can use to
build this type of report?

I appreciate the help!

A Subreport based on a Totals query would do the job. Create a query based on
the table; include the type, the primary key, and a calculated field by typing

Duration: DateDiff("n", [Start Time], [End Time])

Also include any fields that you want to use for criteria (e.g. the visit
date, or the start time if that includes the date).

Change it to a Totals query by clicking the Greek Sigma icon.

Leave the default Group By on the type; change it to Count on the primary key,
and to Sum on the time (which will be in minutes - divide by 60 to get hours
if you wish). Change the totals row to "Where" for the field or fields that
you want to use for search criteria, and put the criterion on the Criteria
line.

Base a Report on this query and include it as a subreport on the footer of
your main report.
 
Back
Top