By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,853 Members | 1,541 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,853 IT Pros & Developers. It's quick & easy.

Section keep-together within subreport?

P: n/a
I tried to fix a problem for a client today in which report sections and even
individual text controls in some of their reports are being split across page
boundaries. Of course, I was thinking the answer was just going to be setting
some Keep Together properties to Yes. Alas, it was not to be.

It turns out that the report in question is actually a combination of 2 other
reports based on different tables. The reports should follow one after the
other with a small gap even if it is in the middle of a page, so the only easy
way to merge them seems to be making them both subreports of a singe master
report. That's all fine except it turns out section Keep Together properties
within subreports are simply ignored.

Next, I tried experimenting with the print control properties in the Format
event handlers, but it turns out these don't work as expected in subreports
either. The Top property does not change from one Format event to the next,
even though I say to advance to the next position, so my code goes into an
endless loop.

Finally, I ended up telling the client that I cannot see that there is any
quick fix for this, and the best solution is probably to use Word automation
to generate the output (which adds some business value for them anyway). I
thought I'd put out a message here though, and see if anyone knows a less
extreme solution.
Nov 13 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
The Keep Together property works in both the detail and group sections. You
could create a group with blank header, and place your subreport in the
group footer. If I understand you correctly, I have similar setups of such
reports with the subreport in the main's report footer.
-Ed

"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:ie********************************@4ax.com...
I tried to fix a problem for a client today in which report sections and
even
individual text controls in some of their reports are being split across
page
boundaries. Of course, I was thinking the answer was just going to be
setting
some Keep Together properties to Yes. Alas, it was not to be.

It turns out that the report in question is actually a combination of 2
other
reports based on different tables. The reports should follow one after
the
other with a small gap even if it is in the middle of a page, so the only
easy
way to merge them seems to be making them both subreports of a singe
master
report. That's all fine except it turns out section Keep Together
properties
within subreports are simply ignored.

Next, I tried experimenting with the print control properties in the
Format
event handlers, but it turns out these don't work as expected in
subreports
either. The Top property does not change from one Format event to the
next,
even though I say to advance to the next position, so my code goes into an
endless loop.

Finally, I ended up telling the client that I cannot see that there is any
quick fix for this, and the best solution is probably to use Word
automation
to generate the output (which adds some business value for them anyway).
I
thought I'd put out a message here though, and see if anyone knows a less
extreme solution.

Nov 13 '05 #2

P: n/a
I don't think you are understanding me correctly. Each subreport may span
multiple pages of the master report. Within each subreport, I want each
section kept together. The Keep Together properties of sections in the
subreport are having no effect whatsoever in any type of section.

On Thu, 17 Feb 2005 13:44:59 GMT, "Ed Robichaud" <ed*********@wdn.com> wrote:
The Keep Together property works in both the detail and group sections. You
could create a group with blank header, and place your subreport in the
group footer. If I understand you correctly, I have similar setups of such
reports with the subreport in the main's report footer.
-Ed

"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:ie********************************@4ax.com.. .
I tried to fix a problem for a client today in which report sections and
even
individual text controls in some of their reports are being split across
page
boundaries. Of course, I was thinking the answer was just going to be
setting
some Keep Together properties to Yes. Alas, it was not to be.

It turns out that the report in question is actually a combination of 2
other
reports based on different tables. The reports should follow one after
the
other with a small gap even if it is in the middle of a page, so the only
easy
way to merge them seems to be making them both subreports of a singe
master
report. That's all fine except it turns out section Keep Together
properties
within subreports are simply ignored.

Next, I tried experimenting with the print control properties in the
Format
event handlers, but it turns out these don't work as expected in
subreports
either. The Top property does not change from one Format event to the
next,
even though I say to advance to the next position, so my code goes into an
endless loop.

Finally, I ended up telling the client that I cannot see that there is any
quick fix for this, and the best solution is probably to use Word
automation
to generate the output (which adds some business value for them anyway).
I
thought I'd put out a message here though, and see if anyone knows a less
extreme solution.


Nov 13 '05 #3

P: n/a
That's what I understood. I've retested that set-up:

main report
sub-report (with 2 groups) in report footer of main report

and the keep together grouping of the sub-report works fine (no broken
sections over multiple pages). Sure that you have the right properties set?
-Ed

"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:sd********************************@4ax.com...
I don't think you are understanding me correctly. Each subreport may span
multiple pages of the master report. Within each subreport, I want each
section kept together. The Keep Together properties of sections in the
subreport are having no effect whatsoever in any type of section.

On Thu, 17 Feb 2005 13:44:59 GMT, "Ed Robichaud" <ed*********@wdn.com>
wrote:
The Keep Together property works in both the detail and group sections.
You
could create a group with blank header, and place your subreport in the
group footer. If I understand you correctly, I have similar setups of
such
reports with the subreport in the main's report footer.
-Ed

"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:ie********************************@4ax.com. ..
I tried to fix a problem for a client today in which report sections and
even
individual text controls in some of their reports are being split across
page
boundaries. Of course, I was thinking the answer was just going to be
setting
some Keep Together properties to Yes. Alas, it was not to be.

It turns out that the report in question is actually a combination of 2
other
reports based on different tables. The reports should follow one after
the
other with a small gap even if it is in the middle of a page, so the
only
easy
way to merge them seems to be making them both subreports of a singe
master
report. That's all fine except it turns out section Keep Together
properties
within subreports are simply ignored.

Next, I tried experimenting with the print control properties in the
Format
event handlers, but it turns out these don't work as expected in
subreports
either. The Top property does not change from one Format event to the
next,
even though I say to advance to the next position, so my code goes into
an
endless loop.

Finally, I ended up telling the client that I cannot see that there is
any
quick fix for this, and the best solution is probably to use Word
automation
to generate the output (which adds some business value for them anyway).
I
thought I'd put out a message here though, and see if anyone knows a
less
extreme solution.

Nov 13 '05 #4

P: n/a
Odd - I just dupicated your results in a new custom report on one of my own
databases. I wonder why it's not working for the client's database?

One thing I remember that was unusual about their report is that the subreport
contians another subrport in a group header. I think it may have been that
section that was splitting across a page boundary.

On Thu, 17 Feb 2005 18:33:25 GMT, "Ed Robichaud" <ed*********@wdn.com> wrote:
That's what I understood. I've retested that set-up:

main report
sub-report (with 2 groups) in report footer of main report

and the keep together grouping of the sub-report works fine (no broken
sections over multiple pages). Sure that you have the right properties set?
-Ed

"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:sd********************************@4ax.com.. .
I don't think you are understanding me correctly. Each subreport may span
multiple pages of the master report. Within each subreport, I want each
section kept together. The Keep Together properties of sections in the
subreport are having no effect whatsoever in any type of section.

On Thu, 17 Feb 2005 13:44:59 GMT, "Ed Robichaud" <ed*********@wdn.com>
wrote:
The Keep Together property works in both the detail and group sections.
You
could create a group with blank header, and place your subreport in the
group footer. If I understand you correctly, I have similar setups of
such
reports with the subreport in the main's report footer.
-Ed

"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:ie********************************@4ax.com ...
I tried to fix a problem for a client today in which report sections and
even
individual text controls in some of their reports are being split across
page
boundaries. Of course, I was thinking the answer was just going to be
setting
some Keep Together properties to Yes. Alas, it was not to be.

It turns out that the report in question is actually a combination of 2
other
reports based on different tables. The reports should follow one after
the
other with a small gap even if it is in the middle of a page, so the
only
easy
way to merge them seems to be making them both subreports of a singe
master
report. That's all fine except it turns out section Keep Together
properties
within subreports are simply ignored.

Next, I tried experimenting with the print control properties in the
Format
event handlers, but it turns out these don't work as expected in
subreports
either. The Top property does not change from one Format event to the
next,
even though I say to advance to the next position, so my code goes into
an
endless loop.

Finally, I ended up telling the client that I cannot see that there is
any
quick fix for this, and the best solution is probably to use Word
automation
to generate the output (which adds some business value for them anyway).
I
thought I'd put out a message here though, and see if anyone knows a
less
extreme solution.


Nov 13 '05 #5

P: n/a
I just successfully duplicated the symptom in a new database, and my guess was
on the right track in the previous post.

If the first section in a subreport (A) can grow and contains another
subreport (B) that can grow, the Keep Together property of the first instance
of the section in subreport (A) is ignored, and the section gets cut in 2 if
it wraps over the end of a page.

The solution that seems to be working is to add another dummy grouping on =1
to the subreport with a 1-twip high header. With that in place, I'm no longer
able to cause the symptom in which first real section gets split across the
page boundary (in my test database - we'll see about the client's database).

On Thu, 17 Feb 2005 10:58:39 -0800, Steve Jorgensen <no****@nospam.nospam>
wrote:
Odd - I just dupicated your results in a new custom report on one of my own
databases. I wonder why it's not working for the client's database?

One thing I remember that was unusual about their report is that the subreport
contains another subrport in a group header. I think it may have been that
section that was splitting across a page boundary.

On Thu, 17 Feb 2005 18:33:25 GMT, "Ed Robichaud" <ed*********@wdn.com> wrote:
That's what I understood. I've retested that set-up:

main report
sub-report (with 2 groups) in report footer of main report

and the keep together grouping of the sub-report works fine (no broken
sections over multiple pages). Sure that you have the right properties set?
-Ed

"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:sd********************************@4ax.com. ..
I don't think you are understanding me correctly. Each subreport may span
multiple pages of the master report. Within each subreport, I want each
section kept together. The Keep Together properties of sections in the
subreport are having no effect whatsoever in any type of section.

On Thu, 17 Feb 2005 13:44:59 GMT, "Ed Robichaud" <ed*********@wdn.com>
wrote:

The Keep Together property works in both the detail and group sections.
You
could create a group with blank header, and place your subreport in the
group footer. If I understand you correctly, I have similar setups of
such
reports with the subreport in the main's report footer.
-Ed

"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:ie********************************@4ax.co m...
>I tried to fix a problem for a client today in which report sections and
>even
> individual text controls in some of their reports are being split across
> page
> boundaries. Of course, I was thinking the answer was just going to be
> setting
> some Keep Together properties to Yes. Alas, it was not to be.
>
> It turns out that the report in question is actually a combination of 2
> other
> reports based on different tables. The reports should follow one after
> the
> other with a small gap even if it is in the middle of a page, so the
> only
> easy
> way to merge them seems to be making them both subreports of a singe
> master
> report. That's all fine except it turns out section Keep Together
> properties
> within subreports are simply ignored.
>
> Next, I tried experimenting with the print control properties in the
> Format
> event handlers, but it turns out these don't work as expected in
> subreports
> either. The Top property does not change from one Format event to the
> next,
> even though I say to advance to the next position, so my code goes into
> an
> endless loop.
>
> Finally, I ended up telling the client that I cannot see that there is
> any
> quick fix for this, and the best solution is probably to use Word
> automation
> to generate the output (which adds some business value for them anyway).
> I
> thought I'd put out a message here though, and see if anyone knows a
> less
> extreme solution.


Nov 13 '05 #6

P: n/a
Thanks for posting back your trouble-shooting and solution. It may help a
lot of folks (including me).
-Ed

"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:51********************************@4ax.com...
I just successfully duplicated the symptom in a new database, and my guess
was
on the right track in the previous post.

If the first section in a subreport (A) can grow and contains another
subreport (B) that can grow, the Keep Together property of the first
instance
of the section in subreport (A) is ignored, and the section gets cut in 2
if
it wraps over the end of a page.

The solution that seems to be working is to add another dummy grouping on
=1
to the subreport with a 1-twip high header. With that in place, I'm no
longer
able to cause the symptom in which first real section gets split across
the
page boundary (in my test database - we'll see about the client's
database).

On Thu, 17 Feb 2005 10:58:39 -0800, Steve Jorgensen <no****@nospam.nospam>
wrote:
Odd - I just dupicated your results in a new custom report on one of my
own
databases. I wonder why it's not working for the client's database?

One thing I remember that was unusual about their report is that the
subreport
contains another subrport in a group header. I think it may have been
that
section that was splitting across a page boundary.

On Thu, 17 Feb 2005 18:33:25 GMT, "Ed Robichaud" <ed*********@wdn.com>
wrote:
That's what I understood. I've retested that set-up:

main report
sub-report (with 2 groups) in report footer of main report

and the keep together grouping of the sub-report works fine (no broken
sections over multiple pages). Sure that you have the right properties
set?
-Ed

"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:sd********************************@4ax.com ...
I don't think you are understanding me correctly. Each subreport may
span
multiple pages of the master report. Within each subreport, I want
each
section kept together. The Keep Together properties of sections in the
subreport are having no effect whatsoever in any type of section.

On Thu, 17 Feb 2005 13:44:59 GMT, "Ed Robichaud" <ed*********@wdn.com>
wrote:

>The Keep Together property works in both the detail and group sections.
>You
>could create a group with blank header, and place your subreport in the
>group footer. If I understand you correctly, I have similar setups of
>such
>reports with the subreport in the main's report footer.
>-Ed
>
>"Steve Jorgensen" <no****@nospam.nospam> wrote in message
>news:ie********************************@4ax.c om...
>>I tried to fix a problem for a client today in which report sections
>>and
>>even
>> individual text controls in some of their reports are being split
>> across
>> page
>> boundaries. Of course, I was thinking the answer was just going to
>> be
>> setting
>> some Keep Together properties to Yes. Alas, it was not to be.
>>
>> It turns out that the report in question is actually a combination of
>> 2
>> other
>> reports based on different tables. The reports should follow one
>> after
>> the
>> other with a small gap even if it is in the middle of a page, so the
>> only
>> easy
>> way to merge them seems to be making them both subreports of a singe
>> master
>> report. That's all fine except it turns out section Keep Together
>> properties
>> within subreports are simply ignored.
>>
>> Next, I tried experimenting with the print control properties in the
>> Format
>> event handlers, but it turns out these don't work as expected in
>> subreports
>> either. The Top property does not change from one Format event to
>> the
>> next,
>> even though I say to advance to the next position, so my code goes
>> into
>> an
>> endless loop.
>>
>> Finally, I ended up telling the client that I cannot see that there
>> is
>> any
>> quick fix for this, and the best solution is probably to use Word
>> automation
>> to generate the output (which adds some business value for them
>> anyway).
>> I
>> thought I'd put out a message here though, and see if anyone knows a
>> less
>> extreme solution.
>

Nov 13 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.