3 Replies Latest reply on Feb 16, 2012 12:54 PM by FileMakerNovice

    Numbering rows in a report

    FileMakerNovice

      Title

      Numbering rows in a report

      Post

      Hello,

      I am wanting to number the rows in my report.  I have a database that has locations and people in each location.  These people are ranked.  The report so far shows a sorted list, first by location, then by person.  Is there a simple way to number the people in each location 1 to x or is a new variable needed to loop through the database needed?

      To simplify database, say there is just one table called sales people.  There are three fields: name, location, score.  I want the report to have everyone from location A like this:


      Location A
      1. Person 1
      2. Person 2
      3. Etc
      Location B
      1. Person 1
      2. Person 2
      3. Etc

        • 1. Re: Numbering rows in a report
          philmodjunk

          The Location sub head can be created with a sub summary part. Do you know how to do that?

          The numbering can be done like this:

          Define a field in the table that always stores a 1. This can be an auto-enter setting or a calculation field.

          Define a summary field as the total of this "one" field. Specify that it comptue a running total and choose the location field as the "group by" field so that the running total restarts with each location. You can then use this running total field to number your report rows.

          • 2. Re: Numbering rows in a report
            philmodjunk

            Hmm, Don't know what i was thinking here. That works, but you don't need the one field as long as you have some field in your table that's never empty such as a primary key field. Then you can set up the summary field to be a running count of this never empty field and use the same group by, running count options I desribed earlier. That works and uses one less field to do so.

            • 3. Re: Numbering rows in a report
              FileMakerNovice

              Perfect.  I am new to Filemaker and didn't know about the summary option.  Thanks.