Conditional Page Breaks

  • Thread starter Thread starter BillDeVoe
  • Start date Start date
B

BillDeVoe

Let me start by saying thanks for all the info I've
gotten from the newsgroups. You all are first rate. This
is actually the first time I've had to post a question,
as I can usually search out the answer.

I have a query driven report which has 8 memo fields
returned on it. The amount of info in each can range from
nothing to the maximum amount of characters allowed.

I've been able to make the report work by inserting page
breaks after each field. However, this can produce blank
pages. Is there any way to make the report only as many
pages long as necessary?

Thanks again.
 
BillDeVoe said:
Let me start by saying thanks for all the info I've
gotten from the newsgroups. You all are first rate. This
is actually the first time I've had to post a question,
as I can usually search out the answer.

I have a query driven report which has 8 memo fields
returned on it. The amount of info in each can range from
nothing to the maximum amount of characters allowed.

I've been able to make the report work by inserting page
breaks after each field. However, this can produce blank
pages. Is there any way to make the report only as many
pages long as necessary?


I'm sure you have a reason for using the page breaks, but to
make the report as short as possible, remove them. If you
used them to make sure the memo fields are not split across
a page boundary, then use the KeepTogether property instead.
 
A bit more detail on Marsh's idea.

In report design view, open the Sorting'n'Grouping dialog (View menu).
In the dialog, choose the primary key field. Then in the lower pane of the
dialog, answer Yes to Group Header and Group Footer. This adds 2 more
sections to the report, in addition to the Detail section.

Repeat on the 2nd line of the dialog. You now have 5 sections.
And again on the 3rd and 4th lines. You now have 9 sections, all using the
same primary key field.

Now you can put one memo field into a section of its own.
Set the CanGrow property of each memo to Yes.
Make sure the CanGrow is Yes for the sections as well.
Set the KeepTogether property of each section to Yes.

The report will now take only as much space as needed for each section, and
will break if the whole section won't fit on the page.
 
Marshall and Allen:

As always, you guys are great. Thank you for solving a
very nerve wracking problem for me, and doubtlessly, many
others who read these posts.

Thanks again.
 
I've got the same problem as Bill. I implemented what
Allen suggested. However, I still only get however much
text will fit in the control as laid out on the report in
design view. I'm using Access 2003. Would that make a
difference?
 
Make sure you have the CanGrow property of your *control* set to Yes, and
also the CanGrow property of the *section* set to Yes.

It works fine in A2003.
 
My bad guys. The query wasn't returning the full value of
the field. I fixed the query, and that fixed the report.

I did need know how to make more sections though. Thanks.
 
Back
Top