Results 1 to 11 of 11
  1. #1
    Join Date
    Jan 2004
    Location
    PA
    Posts
    15

    Unanswered: Forcing Report to start a new page when a value changes? Please Help!

    Hi,

    I am generating billing reports and have ran across a problem. When I have Access generate all the bills in one report, it groups all the detail lines together, and doesn't keep them relative to the customer named in the header. For example, page one of the report will list "John Doe" and his address in the header, then proceed to list his unpaid bills correctly. However, once all of John Doe's bills are displayed, it immediately goes on to display the bills for the next person after John Doe on the same page. When the next page is displayed, the name in the header finally changes, but doesn't change to the next one in order, but changes to match the first bill on the new page. How do I make it so after the name changes, it advances to a new page and displays the correct header info for that person?

    Thanks, I appreciate the help!
    Joe

  2. #2
    Join Date
    Sep 2003
    Location
    Caldes de Malavella, Spain
    Posts
    244

    Re: Forcing Report to start a new page when a value changes? Please Help!

    Insert a Page Break in your "John Doe" footer
    Andy Briggs
    Elmhurst Solutions Limited
    Database Development and Consultancy
    http://www.elmhurstsolutions.com

  3. #3
    Join Date
    Jan 2004
    Location
    PA
    Posts
    15

    Re: Forcing Report to start a new page when a value changes? Please Help!

    Nope that didn't work. The problem is in the detail section, where it is putting billing detail lines that don't belong to the person listed in the header. I'm going to need some kind of code while it's processing the detail lines that says "When the Customer ID number changes, print the records already processed, print the footer, advance to the next page, print the new header with the next Customer info on it, then start the detail lines again.

    Joe

  4. #4
    Join Date
    Dec 2003
    Location
    WA, USA
    Posts
    51

    Re: Forcing Report to start a new page when a value changes? Please Help!

    In your group header properties set

    Force new page: Before Section
    Keep Together: Yes
    Bob

  5. #5
    Join Date
    Jan 2004
    Location
    PA
    Posts
    15

    Re: Forcing Report to start a new page when a value changes? Please Help!

    Originally posted by irwinb
    In your group header properties set

    Force new page: Before Section
    Keep Together: Yes
    Well, that sort of worked...now, the name in the header does match the billing detail line, but it's only printing one record per page. I want to have all records pertaining to that single customer on the same page (the most detail lines there would be for a single customer is 10, so they should easily fit on one page). Do I need some kind of IF statement somewhere saying to only break when the Customer ID changes? If so, where should I put that?

    Thanks again...you guys have been a great help!
    Joe

  6. #6
    Join Date
    Jan 2004
    Location
    Bedford, UK
    Posts
    5

    Re: Forcing Report to start a new page when a value changes? Please Help!

    In the 'Sorting and Grouping' menu (icon on bar), have you grouped by customer? If not, do so and ensure new page before (or after) section.

    David

  7. #7
    Join Date
    Jan 2004
    Location
    PA
    Posts
    15
    Maybe I'm doing something wrong...I tried the sorting and grouping but it didn't work completely. Changing the setting for page break both before and/or after update produced only 1 record per page, so I took it off. I posted some stills of the report on: http://joehuth.8m.com/photo.html

    The first image shows the report in preview mode; the second in design mode. The first ID number, ALBDA000, does correspond to the name listed in the header, Danielle Albright. However, see where it changes to ANDCH000? That's Charles Anderson, a new customer. A new page should start there (so that only the first 2 records for ALBDA000 are on the first page) with his address in the header.

    Thanks,
    Joe

  8. #8
    Join Date
    Jan 2004
    Location
    PA
    Posts
    15
    Anybody have an ideas on this?

  9. #9
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Re: Forcing Report to start a new page when a value changes? Please Help!

    Originally posted by supersuit99
    Nope that didn't work. The problem is in the detail section, where it is putting billing detail lines that don't belong to the person listed in the header. I'm going to need some kind of code while it's processing the detail lines that says "When the Customer ID number changes, print the records already processed, print the footer, advance to the next page, print the new header with the next Customer info on it, then start the detail lines again.

    Joe
    Hey, have you tried once creating a CustomerName header or whatever it's called, click on the header bar and go to properties for that section. On the Format tab, play with the ForceNewPage and the KeepTogether choices. That might do it and then collapse your Detail section by moving the bar at the bottom of the detail portion up as high as it can go...it will only go to the bottom of the last field.

    Bud

  10. #10
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    I assume the chart number is going to be unique for each customer? Having quite a bit of experience coding applications for medical facilities, that tends to be the norm.

    If so, the Chart Number Header should actually be your first section. Move everything from your current chart header into that first section. That will take care of your grouping issue. Then set a Chart Number footer. Put your grand total there instead of in the page footer. Then set force new page to true for the following section. Also, set "keep together" for "whole group" in your chart number header.

    Basically you need to combine your two "headers" into one, and add a group footer instead of a page footer.

    Does that make any sense at all?

  11. #11
    Join Date
    Jan 2004
    Location
    PA
    Posts
    15
    Teddy,

    That did it! Thank you very much...I owe ya one! And thanks to everyone else who posted suggestions!

    Joe

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •