1 Reply Latest reply on Feb 18, 2013 3:14 PM by philmodjunk

    Creating a Report to Count Number of Instances of a Field

    EV

      Title

      Creating a Report to Count Number of Instances of a Field

      Post

           I am creating a database to manage data about students from various schools within a district.  I would like to create a report that would count the number of records for a particular school.  For example, if the schools in the district where Lincoln, Washington, Kennedy, Roosevelt, Polk, and Harrison, I want to create a report that would list the number of students whose records match each school.

           So, it would return data such as:

           Lincoln  34

           Washington  29

           Kennedy  56

           Roosevelt  70

           Polk  4

           Harrison  11

           After determining how to do this, I would like to replicate it for (or break up the school data into subcategories based on) gender, ethnicity, etc.

           I have tried looking for a solution (and I could have easily missed something), but I have failed to find anything.

        • 1. Re: Creating a Report to Count Number of Instances of a Field
          philmodjunk

               This example assumes that you have a single table of student records with one student per record. If you have a related table that you link to in order to specify the name of the school, this method still works.

               Define a summary field as the "count of" some field in your students table that is never empty.

               Create a new layout based on your Students table.

               While in layout mode, double click the part label for the body to open up part setup.

               Change the body part into a sub summary layout part "when sorted by" School--use the field in students that stores the name of the school or refer to the name field from a related table of schools.

               Put the school name field and the summary field in this sub summary layout part.

               Enter browse mode.

               Change to list view.

               Sort your records by the same field that you specified as the 'when sorted by' field for the sub summary layout part.

               The layout will appear empty until you sort your records.

               To get this report for different groups of student records, perform a find and then sort the records by School. Manual finds would need to be performed on a different layout based on the same table occurrence as this report layout.