Solved

Conditional Page Break

Posted on 2011-09-06
2
471 Views
Last Modified: 2012-05-12
Hello Experts,

My client has asked me for a really unique request, and I hope you can provide me with an idea or two on how to make this happen...

I have a commissions report with the following layout:

   Location group
      Sales Person (Agent) Group
          Transactions List

After printing, my client actually cuts each agent's section, placing it in an envelope with a cheque.  

This works for them, but the problem is that an agent may just start at the bottom of one page and finish at the top of the next.  As well, I cannot place a page break after each agent, as most have 2 or 3 transactions, which will generate 200 pages with more than 80% of the pages being empty.

A single page sometimes can comfortably fit 4 agents on it, so what i'm looking for is if I can execute the folowing condition:

      If Agent group does not finish on current page, start on next page

One exclusion, however, in the very rare cases, that one agent may have many transactions spanning to more than one full page, i do not want the above logic to cause an endless loop, where it will never fit one the "current" page, moving forward to the next page, which will become the new "current" page.

For the time being, i would like to keep this within Access/VBA, but am also open to exporting it to another Office or 3rd party apllication.

Many thanks in advance.
0
Comment
Question by:APD_Toronto
2 Comments
 
LVL 10

Accepted Solution

by:
LukeChung-FMS earned 500 total points
ID: 36489350
There's a KeepTogether prorperty for groups that will do what you want. Set it to Yes, and it will make sure the whole group stays on one page, and if not, issues a page break before it.

If the group itself is more than one page, it will go beyond that of course but that's expected.

More resources including report tips on our Microsoft Access Developer Help Center.

hope this helps.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 36489450
...else post a small sample DB that demonstrate the issue, and post a graphic example of the *exact* output required for each scenario... based on the sample data
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

How to increase the row limit in Jasper Server.
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now