*SubReport* Please don't split!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have a report with 5 subreports. Each subreport will print an undetermined
amount of lines, depending on what the record set will be! Lets say for
examples sakes, subreport#1 will print 10 lines. Right below subreport#1,
subreport#2 will print 12 lines. Now, lets say on this page, the maximum
lines available under subreport#2 is 5 lines. But subreport#3 has 15 lines.

Right now, the way my subreport is setup, it will print the 5 lines on the
current page and the remaining 10 lines will print on the next page. This
often brings confusion when looking at a report.

What I would like to do, is, if the subreport#3 completely fits on the page,
then leave it be, however if it doesn't fit (as described in the example
above) completely push over subreport#3 so that the enrtire 15 lines would
print on the next page.
Basically I would not want any of my subreports fragmented in several pages
unless my report would be 300 lines long, obviously I have no choice. I
thought of putting a page break after every subreport, but this would cause
the report to have lots of blank space since, sometimes, several subreports
could contain 4 to 8 lines.

The idea here, is, if the report doesn't fit in the remaining space of the
current page, then push it over to start it on the next page.

I don't know if there is a setting for this, but if anyone knows what I can
do to resolve this problem, Please let me know, thanking you all in advance.

Best regards
Robert
 
Robby said:
I have a report with 5 subreports. Each subreport will print an undetermined
amount of lines, depending on what the record set will be! Lets say for
examples sakes, subreport#1 will print 10 lines. Right below subreport#1,
subreport#2 will print 12 lines. Now, lets say on this page, the maximum
lines available under subreport#2 is 5 lines. But subreport#3 has 15 lines.

Right now, the way my subreport is setup, it will print the 5 lines on the
current page and the remaining 10 lines will print on the next page. This
often brings confusion when looking at a report.

What I would like to do, is, if the subreport#3 completely fits on the page,
then leave it be, however if it doesn't fit (as described in the example
above) completely push over subreport#3 so that the enrtire 15 lines would
print on the next page.
Basically I would not want any of my subreports fragmented in several pages
unless my report would be 300 lines long, obviously I have no choice. I
thought of putting a page break after every subreport, but this would cause
the report to have lots of blank space since, sometimes, several subreports
could contain 4 to 8 lines.

The idea here, is, if the report doesn't fit in the remaining space of the
current page, then push it over to start it on the next page.


Create groups in the main report using Sorting and Grouping
(View menu). Set the groups to a constant expression such
as =1 and select Yes for both the Header and Footer.

Now move each subreport to its own section and set the
sections' KeepTogether property to Yes.
 
I thankyou a million, I don't reaaly understand what grouping and sorting
does to a report, cause I never really played with it, However, I didi what
you told me, and it works!!!!!

Robert!
 
Robby said:
I thankyou a million, I don't reaaly understand what grouping and sorting
does to a report, cause I never really played with it, However, I didi what
you told me, and it works!!!!!

This particular use of grouping is somewhat artificial just
to get more sections in the report.

The usual Sorting and Grouping based on a field in the
report's record source table/query is a very powerful
feature that you should take some time to understand. The
general idea is that it allows you to clump related data
together without repeating the common values and it allows
easy calculation of totals for the group. For example,
let's say the you have the following data records:

John 12
Mary 23
John 13
Mary 11

A report that is grouped on the name field can easily be
made to look like this:

John
12
13
-------
25

Mary
23
11
 
Back
Top