• Report page breaks (Access 2003)

    Author
    Topic
    #414796

    I have a report that is approximately 260 pages long. It is organized by employee name. I am wondering if there is any way to get the report to do a page break before each letter of the alphabet. I want to present this report in a binder and I intend to use alpha tabs to facilitate getting to where you want to be in the report. I’d like the report to do all names beginning with A, page break, all names beginning with B, page break, etc. I have not been able to find anything to help me do this. Is it a possibility? Thanks for your help.

    Viewing 0 reply threads
    Author
    Replies
    • #923228

      Open the report in design view.
      Activate the Sorting and Grouping window.
      Select the employee name field in the Field/Expression column.
      Set Group Header to Yes.
      Specify that you want to group on the first character.
      You can display the letter in the group header, in a text box with control source =Left([EmployeeName],1) or you can leave the group header empty, even set its height to 0.
      Click on the gray bar in the report representing the group header.
      Activate the Format tab of the Properties window.
      Select ‘Before Section’ in the Force New Page property.

      • #923236

        This is not working for me. I don’t have a choice of first character. I can choose from Each Value, which is how I had it set, or Prefix Characters. I tried Prefix Characters, then used 1 on the next line which allegedly should be the number of characters and I completed the rest. But I got a funky result. The resulting preview of the report picked the third name in the A’s and showed all of the data for everyone under that name, B’s moved way down the list and showed all the data under the one name it showed. I must be doing something wrong but I don’t see what. I had the report set up with FullName as a group header, then Year. I changed year so it is not a group header anymore, thinking that might be causing some problem. I tried moving the name into the Detail section, but that gave me a similar result, except it kept repeating three names.

        • #923238

          How do you want to sort/group the employees? By year, then by first letter of name? Or vice versa? Or differently?

          • #923242

            The report is sorted, grouped by Employee, then year. So I have all of a person’s employment history under the name, organized by year. Like
            John Q. Public
            1924 ABC Company accountant
            DEF Company chief payroll officer
            1925 ABC Company accountant
            1926 DEF Company chief payroll officer

            Am I making sense here? I want it by name, then year. I used the name as a group header because I do not want it to repeat with each entry. Same with year.

            • #923245

              I suppose you don’t want to group on the first letter of the full name of the employee (John Q. Public) – you would sort on the first letter of the first name (Abe/Adam/Anne, then Barry/Beryl/Bruce, etc.) If you have the last name as a separate field, you should use that for grouping, and drag it to the top in the Sorting and Grouping window. Specify Yes for Group Header, Prefix Characters for Group By, and 1 as Group Interval. In the next row of the Sorting and Grouping window, put the last name field again, but this time set the Group By to Each Value (and Group Header to Yes). This takes care of sorting the employees whose last name begins with the same letter. In the third row, put the year field, with Group Header set to No. If you don’t want the year field to repeat, set the Hide Duplicates property of the text box bound to the year field to Yes.

            • #923430

              Hi Hans! Thanks so much! I tried this out first thing this morning and it works great. It never would have occurred to me that I could use the same field twice to sort/group by. Again, thanks!

    Viewing 0 reply threads
    Reply To: Report page breaks (Access 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: