"Contd from previous page" when groupheader or pageheadersection..

O

Odniel

I am asking for more help because I really need it.

I have a report with a subreport in it. The page format is as follows:

Product ID [Subreport showing each item per product]

I would like "Contd from previous page" to show up at the top of each page
whenever the subreport flows into the next page. I have tried the following
code:

If Me.GroupHeader0.HasContinued = True Then
Me.Label76.Visible = True
Else
Me.Label76.Visible = False
End If

I have also tried the same code with "PageHeaderSection" instead of
"GroupHeader0." The result, time and again, is that the "Contd" message shows
up at random, not every instance, as is desired.

What can I do to have the message show up at every time the subreport flows
into the next page?

Your help is very much appreciated!
 
M

Marshall Barton

Odniel said:
I have a report with a subreport in it. The page format is as follows:

Product ID [Subreport showing each item per product]

I would like "Contd from previous page" to show up at the top of each page
whenever the subreport flows into the next page. I have tried the following
code:

If Me.GroupHeader0.HasContinued = True Then
Me.Label76.Visible = True
Else
Me.Label76.Visible = False
End If

I have also tried the same code with "PageHeaderSection" instead of
"GroupHeader0." The result, time and again, is that the "Contd" message shows
up at random, not every instance, as is desired.

What can I do to have the message show up at every time the subreport flows
into the next page?


We need more specific information about the main report.

What section is the subreport in? If the subreport is in
the group header section, your posted code should work. If
it's in the detail section then your code may be doing what
you told it to do, but it would have nothing to do with the
subreport (Will/Has Continued only deals with a single
section, not a group of details).

Is the subreport the only item in the detail (or whatever)
section? If it is, then you can use the HasContinued
property of the detail section. If there is other stuff
that you don't want included under the "Cont'd" label, then
you will need another mechanism to accomplish theis goal.

Is there only the single subreport in the section or are
there other subreports, each with it's own "Cont'd" label?

In the more complex situations, I think one way to get what
you want might be to use the subreport itself to manage the
"Cont'd" label. Use the subreport's Report Header's Format
event to make the label visible:
Me.Parent.Label76.Visible = True
and similarly for making it invisible in the subreport's
Footer section.
 
O

Odniel

The group header contains product name and information from one table along
with the subreport. The subreport contains all the items for each product.

Example: The product name is Belvedere, and it's details are dimensions and
price. The subreport contains all the colors available for Belvedere.

The group header would have the name and the details to the left and right.
The subreport is in the middle.

Marshall Barton said:
Odniel said:
I have a report with a subreport in it. The page format is as follows:

Product ID [Subreport showing each item per product]

I would like "Contd from previous page" to show up at the top of each page
whenever the subreport flows into the next page. I have tried the following
code:

If Me.GroupHeader0.HasContinued = True Then
Me.Label76.Visible = True
Else
Me.Label76.Visible = False
End If

I have also tried the same code with "PageHeaderSection" instead of
"GroupHeader0." The result, time and again, is that the "Contd" message shows
up at random, not every instance, as is desired.

What can I do to have the message show up at every time the subreport flows
into the next page?


We need more specific information about the main report.

What section is the subreport in? If the subreport is in
the group header section, your posted code should work. If
it's in the detail section then your code may be doing what
you told it to do, but it would have nothing to do with the
subreport (Will/Has Continued only deals with a single
section, not a group of details).

Is the subreport the only item in the detail (or whatever)
section? If it is, then you can use the HasContinued
property of the detail section. If there is other stuff
that you don't want included under the "Cont'd" label, then
you will need another mechanism to accomplish theis goal.

Is there only the single subreport in the section or are
there other subreports, each with it's own "Cont'd" label?

In the more complex situations, I think one way to get what
you want might be to use the subreport itself to manage the
"Cont'd" label. Use the subreport's Report Header's Format
event to make the label visible:
Me.Parent.Label76.Visible = True
and similarly for making it invisible in the subreport's
Footer section.
 
M

Marshall Barton

I'm still not 100% sure what you're describing. You said
that the product details are to the left and right of the
subreport. I guess I should read that as there are product
related field values next to the subreport and the detail
section has some other kind of data that's not important to
the problem.

With that understanding, I don't see why your code doesn't
work as long as it's in the PageHeader section's Format
event procedure.

Maybe it would help me figure out what's going on if you
could find some kind of pattern to the "randon" appearance
of the "Cont'd" label.
--
Marsh
MVP [MS Access]

The group header contains product name and information from one table along
with the subreport. The subreport contains all the items for each product.

Example: The product name is Belvedere, and it's details are dimensions and
price. The subreport contains all the colors available for Belvedere.

The group header would have the name and the details to the left and right.
The subreport is in the middle.

Odniel said:
I have a report with a subreport in it. The page format is as follows:

Product ID [Subreport showing each item per product]

I would like "Contd from previous page" to show up at the top of each page
whenever the subreport flows into the next page. I have tried the following
code:

If Me.GroupHeader0.HasContinued = True Then
Me.Label76.Visible = True
Else
Me.Label76.Visible = False
End If

I have also tried the same code with "PageHeaderSection" instead of
"GroupHeader0." The result, time and again, is that the "Contd" message shows
up at random, not every instance, as is desired.

What can I do to have the message show up at every time the subreport flows
into the next page?
Marshall Barton said:
We need more specific information about the main report.

What section is the subreport in? If the subreport is in
the group header section, your posted code should work. If
it's in the detail section then your code may be doing what
you told it to do, but it would have nothing to do with the
subreport (Will/Has Continued only deals with a single
section, not a group of details).

Is the subreport the only item in the detail (or whatever)
section? If it is, then you can use the HasContinued
property of the detail section. If there is other stuff
that you don't want included under the "Cont'd" label, then
you will need another mechanism to accomplish theis goal.

Is there only the single subreport in the section or are
there other subreports, each with it's own "Cont'd" label?

In the more complex situations, I think one way to get what
you want might be to use the subreport itself to manage the
"Cont'd" label. Use the subreport's Report Header's Format
event to make the label visible:
Me.Parent.Label76.Visible = True
and similarly for making it invisible in the subreport's
Footer section.
 
O

Odniel

I tried applying the code to the subreport's report header On Format, and it
works to a certain extent. Now I have to figure out how to make Label76
invisible when the subreport does not flow to the next page.

Marshall Barton said:
Odniel said:
I have a report with a subreport in it. The page format is as follows:

Product ID [Subreport showing each item per product]

I would like "Contd from previous page" to show up at the top of each page
whenever the subreport flows into the next page. I have tried the following
code:

If Me.GroupHeader0.HasContinued = True Then
Me.Label76.Visible = True
Else
Me.Label76.Visible = False
End If

I have also tried the same code with "PageHeaderSection" instead of
"GroupHeader0." The result, time and again, is that the "Contd" message shows
up at random, not every instance, as is desired.

What can I do to have the message show up at every time the subreport flows
into the next page?


We need more specific information about the main report.

What section is the subreport in? If the subreport is in
the group header section, your posted code should work. If
it's in the detail section then your code may be doing what
you told it to do, but it would have nothing to do with the
subreport (Will/Has Continued only deals with a single
section, not a group of details).

Is the subreport the only item in the detail (or whatever)
section? If it is, then you can use the HasContinued
property of the detail section. If there is other stuff
that you don't want included under the "Cont'd" label, then
you will need another mechanism to accomplish theis goal.

Is there only the single subreport in the section or are
there other subreports, each with it's own "Cont'd" label?

In the more complex situations, I think one way to get what
you want might be to use the subreport itself to manage the
"Cont'd" label. Use the subreport's Report Header's Format
event to make the label visible:
Me.Parent.Label76.Visible = True
and similarly for making it invisible in the subreport's
Footer section.
 
O

Odniel

I do not see a concrete pattern.#1 Label76 appears at the top of the page
when a group starts. #2 Less frequently, Label76 appears at the top of the
page after a group ends on the previous page.

Example of #1 - The product "Marshall" begins on page 7. "Marshall Contd"
shows up before Marshall even though the items for the preceding product do
not flow from page 6 to 7.

Example of #2 - The product "Contemplation" begins and ends on page 2.
"Contemplation contd" shows up at the top of page 3 .




Marshall Barton said:
I'm still not 100% sure what you're describing. You said
that the product details are to the left and right of the
subreport. I guess I should read that as there are product
related field values next to the subreport and the detail
section has some other kind of data that's not important to
the problem.

With that understanding, I don't see why your code doesn't
work as long as it's in the PageHeader section's Format
event procedure.

Maybe it would help me figure out what's going on if you
could find some kind of pattern to the "randon" appearance
of the "Cont'd" label.
--
Marsh
MVP [MS Access]

The group header contains product name and information from one table along
with the subreport. The subreport contains all the items for each product.

Example: The product name is Belvedere, and it's details are dimensions and
price. The subreport contains all the colors available for Belvedere.

The group header would have the name and the details to the left and right.
The subreport is in the middle.

Odniel wrote:
I have a report with a subreport in it. The page format is as follows:

Product ID [Subreport showing each item per product]

I would like "Contd from previous page" to show up at the top of each page
whenever the subreport flows into the next page. I have tried the following
code:

If Me.GroupHeader0.HasContinued = True Then
Me.Label76.Visible = True
Else
Me.Label76.Visible = False
End If

I have also tried the same code with "PageHeaderSection" instead of
"GroupHeader0." The result, time and again, is that the "Contd" message shows
up at random, not every instance, as is desired.

What can I do to have the message show up at every time the subreport flows
into the next page?
Marshall Barton said:
We need more specific information about the main report.

What section is the subreport in? If the subreport is in
the group header section, your posted code should work. If
it's in the detail section then your code may be doing what
you told it to do, but it would have nothing to do with the
subreport (Will/Has Continued only deals with a single
section, not a group of details).

Is the subreport the only item in the detail (or whatever)
section? If it is, then you can use the HasContinued
property of the detail section. If there is other stuff
that you don't want included under the "Cont'd" label, then
you will need another mechanism to accomplish theis goal.

Is there only the single subreport in the section or are
there other subreports, each with it's own "Cont'd" label?

In the more complex situations, I think one way to get what
you want might be to use the subreport itself to manage the
"Cont'd" label. Use the subreport's Report Header's Format
event to make the label visible:
Me.Parent.Label76.Visible = True
and similarly for making it invisible in the subreport's
Footer section.
 
M

Marshall Barton

I'm still thinking about the HasContinued issue.

To turn off the label when the sub report ends, use the
subreport Report Footer section's Format or Print event. If
the subreport does not have any data to display, just set
its height to 0.
--
Marsh
MVP [MS Access]

I tried applying the code to the subreport's report header On Format, and it
works to a certain extent. Now I have to figure out how to make Label76
invisible when the subreport does not flow to the next page.

Odniel said:
I have a report with a subreport in it. The page format is as follows:

Product ID [Subreport showing each item per product]

I would like "Contd from previous page" to show up at the top of each page
whenever the subreport flows into the next page. I have tried the following
code:

If Me.GroupHeader0.HasContinued = True Then
Me.Label76.Visible = True
Else
Me.Label76.Visible = False
End If

I have also tried the same code with "PageHeaderSection" instead of
"GroupHeader0." The result, time and again, is that the "Contd" message shows
up at random, not every instance, as is desired.

What can I do to have the message show up at every time the subreport flows
into the next page?
Marshall Barton said:
We need more specific information about the main report.

What section is the subreport in? If the subreport is in
the group header section, your posted code should work. If
it's in the detail section then your code may be doing what
you told it to do, but it would have nothing to do with the
subreport (Will/Has Continued only deals with a single
section, not a group of details).

Is the subreport the only item in the detail (or whatever)
section? If it is, then you can use the HasContinued
property of the detail section. If there is other stuff
that you don't want included under the "Cont'd" label, then
you will need another mechanism to accomplish theis goal.

Is there only the single subreport in the section or are
there other subreports, each with it's own "Cont'd" label?

In the more complex situations, I think one way to get what
you want might be to use the subreport itself to manage the
"Cont'd" label. Use the subreport's Report Header's Format
event to make the label visible:
Me.Parent.Label76.Visible = True
and similarly for making it invisible in the subreport's
Footer section.
 
M

Marshall Barton

The only thing I can come up with that might explain that is
if the section has some kind of blank space at the beginning
and end that is crossing page boundaries without being
obvious. A quick way to verify this hypothesis is to set
the sections BackColor to Red. Unlikely as you missing this
possibility is, it can be avoided by using the ForceNew Page
- Before Section property.

If that's not the case, then maybe(??) you are using
KeepTogether in some way that is confusing Access about
which page the section starts and end on. I think I will
give up on the Will/Has Continued feature altogether if it's
subject to this kind of confusion.

Were you able to get the label turned off by using the code
in the subreport's footer ?
--
Marsh
MVP [MS Access]

I do not see a concrete pattern.#1 Label76 appears at the top of the page
when a group starts. #2 Less frequently, Label76 appears at the top of the
page after a group ends on the previous page.

Example of #1 - The product "Marshall" begins on page 7. "Marshall Contd"
shows up before Marshall even though the items for the preceding product do
not flow from page 6 to 7.

Example of #2 - The product "Contemplation" begins and ends on page 2.
"Contemplation contd" shows up at the top of page 3 .


Marshall Barton said:
I'm still not 100% sure what you're describing. You said
that the product details are to the left and right of the
subreport. I guess I should read that as there are product
related field values next to the subreport and the detail
section has some other kind of data that's not important to
the problem.

With that understanding, I don't see why your code doesn't
work as long as it's in the PageHeader section's Format
event procedure.

Maybe it would help me figure out what's going on if you
could find some kind of pattern to the "randon" appearance
of the "Cont'd" label.

The group header contains product name and information from one table along
with the subreport. The subreport contains all the items for each product.

Example: The product name is Belvedere, and it's details are dimensions and
price. The subreport contains all the colors available for Belvedere.

The group header would have the name and the details to the left and right.
The subreport is in the middle.


Odniel wrote:
I have a report with a subreport in it. The page format is as follows:

Product ID [Subreport showing each item per product]

I would like "Contd from previous page" to show up at the top of each page
whenever the subreport flows into the next page. I have tried the following
code:

If Me.GroupHeader0.HasContinued = True Then
Me.Label76.Visible = True
Else
Me.Label76.Visible = False
End If

I have also tried the same code with "PageHeaderSection" instead of
"GroupHeader0." The result, time and again, is that the "Contd" message shows
up at random, not every instance, as is desired.

What can I do to have the message show up at every time the subreport flows
into the next page?


:
We need more specific information about the main report.

What section is the subreport in? If the subreport is in
the group header section, your posted code should work. If
it's in the detail section then your code may be doing what
you told it to do, but it would have nothing to do with the
subreport (Will/Has Continued only deals with a single
section, not a group of details).

Is the subreport the only item in the detail (or whatever)
section? If it is, then you can use the HasContinued
property of the detail section. If there is other stuff
that you don't want included under the "Cont'd" label, then
you will need another mechanism to accomplish theis goal.

Is there only the single subreport in the section or are
there other subreports, each with it's own "Cont'd" label?

In the more complex situations, I think one way to get what
you want might be to use the subreport itself to manage the
"Cont'd" label. Use the subreport's Report Header's Format
event to make the label visible:
Me.Parent.Label76.Visible = True
and similarly for making it invisible in the subreport's
Footer section.
 
O

Odniel

I got it to more or less where I want it by putting the product name in the
group header section, and all the other info, including the subreport, in the
detail section of the main report.

Now I have to filter out the duplicate product names that appear at the
bottom of some pages when the next product group starts at the top of the
next page.

Any ideas?

Marshall Barton said:
I'm still thinking about the HasContinued issue.

To turn off the label when the sub report ends, use the
subreport Report Footer section's Format or Print event. If
the subreport does not have any data to display, just set
its height to 0.
--
Marsh
MVP [MS Access]

I tried applying the code to the subreport's report header On Format, and it
works to a certain extent. Now I have to figure out how to make Label76
invisible when the subreport does not flow to the next page.

Odniel wrote:
I have a report with a subreport in it. The page format is as follows:

Product ID [Subreport showing each item per product]

I would like "Contd from previous page" to show up at the top of each page
whenever the subreport flows into the next page. I have tried the following
code:

If Me.GroupHeader0.HasContinued = True Then
Me.Label76.Visible = True
Else
Me.Label76.Visible = False
End If

I have also tried the same code with "PageHeaderSection" instead of
"GroupHeader0." The result, time and again, is that the "Contd" message shows
up at random, not every instance, as is desired.

What can I do to have the message show up at every time the subreport flows
into the next page?
Marshall Barton said:
We need more specific information about the main report.

What section is the subreport in? If the subreport is in
the group header section, your posted code should work. If
it's in the detail section then your code may be doing what
you told it to do, but it would have nothing to do with the
subreport (Will/Has Continued only deals with a single
section, not a group of details).

Is the subreport the only item in the detail (or whatever)
section? If it is, then you can use the HasContinued
property of the detail section. If there is other stuff
that you don't want included under the "Cont'd" label, then
you will need another mechanism to accomplish theis goal.

Is there only the single subreport in the section or are
there other subreports, each with it's own "Cont'd" label?

In the more complex situations, I think one way to get what
you want might be to use the subreport itself to manage the
"Cont'd" label. Use the subreport's Report Header's Format
event to make the label visible:
Me.Parent.Label76.Visible = True
and similarly for making it invisible in the subreport's
Footer section.
 
M

Marshall Barton

What do you mean "filter out the duplicate product names"?

If it just that you don't want the product name to appear in
the detail, then remove that text box?
--
Marsh
MVP [MS Access]

I got it to more or less where I want it by putting the product name in the
group header section, and all the other info, including the subreport, in the
detail section of the main report.

Now I have to filter out the duplicate product names that appear at the
bottom of some pages when the next product group starts at the top of the
next page.


Marshall Barton said:
I'm still thinking about the HasContinued issue.

To turn off the label when the sub report ends, use the
subreport Report Footer section's Format or Print event. If
the subreport does not have any data to display, just set
its height to 0.

I tried applying the code to the subreport's report header On Format, and it
works to a certain extent. Now I have to figure out how to make Label76
invisible when the subreport does not flow to the next page.


Odniel wrote:
I have a report with a subreport in it. The page format is as follows:

Product ID [Subreport showing each item per product]

I would like "Contd from previous page" to show up at the top of each page
whenever the subreport flows into the next page. I have tried the following
code:

If Me.GroupHeader0.HasContinued = True Then
Me.Label76.Visible = True
Else
Me.Label76.Visible = False
End If

I have also tried the same code with "PageHeaderSection" instead of
"GroupHeader0." The result, time and again, is that the "Contd" message shows
up at random, not every instance, as is desired.

What can I do to have the message show up at every time the subreport flows
into the next page?


:
We need more specific information about the main report.

What section is the subreport in? If the subreport is in
the group header section, your posted code should work. If
it's in the detail section then your code may be doing what
you told it to do, but it would have nothing to do with the
subreport (Will/Has Continued only deals with a single
section, not a group of details).

Is the subreport the only item in the detail (or whatever)
section? If it is, then you can use the HasContinued
property of the detail section. If there is other stuff
that you don't want included under the "Cont'd" label, then
you will need another mechanism to accomplish theis goal.

Is there only the single subreport in the section or are
there other subreports, each with it's own "Cont'd" label?

In the more complex situations, I think one way to get what
you want might be to use the subreport itself to manage the
"Cont'd" label. Use the subreport's Report Header's Format
event to make the label visible:
Me.Parent.Label76.Visible = True
and similarly for making it invisible in the subreport's
Footer section.
 
O

Odniel

I have put the desired effect into a statement:

"At the end of each page, [subreport detail] either continues or it does not.

If [subreport detail] will not continue, then [main report groupheader]
starts on the next page.

If [subreport detail] continues, label76 appears on the next page."

Hopefully there's code to accomplish that. I've also tried manipulating the
groupheader's settings, namely "Force New Page" and "Repeat Section."


Marshall Barton said:
What do you mean "filter out the duplicate product names"?

If it just that you don't want the product name to appear in
the detail, then remove that text box?
--
Marsh
MVP [MS Access]

I got it to more or less where I want it by putting the product name in the
group header section, and all the other info, including the subreport, in the
detail section of the main report.

Now I have to filter out the duplicate product names that appear at the
bottom of some pages when the next product group starts at the top of the
next page.


Marshall Barton said:
I'm still thinking about the HasContinued issue.

To turn off the label when the sub report ends, use the
subreport Report Footer section's Format or Print event. If
the subreport does not have any data to display, just set
its height to 0.


Odniel wrote:
I tried applying the code to the subreport's report header On Format, and it
works to a certain extent. Now I have to figure out how to make Label76
invisible when the subreport does not flow to the next page.


Odniel wrote:
I have a report with a subreport in it. The page format is as follows:

Product ID [Subreport showing each item per product]

I would like "Contd from previous page" to show up at the top of each page
whenever the subreport flows into the next page. I have tried the following
code:

If Me.GroupHeader0.HasContinued = True Then
Me.Label76.Visible = True
Else
Me.Label76.Visible = False
End If

I have also tried the same code with "PageHeaderSection" instead of
"GroupHeader0." The result, time and again, is that the "Contd" message shows
up at random, not every instance, as is desired.

What can I do to have the message show up at every time the subreport flows
into the next page?


:
We need more specific information about the main report.

What section is the subreport in? If the subreport is in
the group header section, your posted code should work. If
it's in the detail section then your code may be doing what
you told it to do, but it would have nothing to do with the
subreport (Will/Has Continued only deals with a single
section, not a group of details).

Is the subreport the only item in the detail (or whatever)
section? If it is, then you can use the HasContinued
property of the detail section. If there is other stuff
that you don't want included under the "Cont'd" label, then
you will need another mechanism to accomplish theis goal.

Is there only the single subreport in the section or are
there other subreports, each with it's own "Cont'd" label?

In the more complex situations, I think one way to get what
you want might be to use the subreport itself to manage the
"Cont'd" label. Use the subreport's Report Header's Format
event to make the label visible:
Me.Parent.Label76.Visible = True
and similarly for making it invisible in the subreport's
Footer section.
 
M

Marshall Barton

Your "statement" is not clarifying things for me. I thought
we were talking about the subreport being split across a
page boundary, for which I thought I provided and answer.
Then you said something about "duplicate" products that I
could not relate to anything we've discussed so far. Now
it's starting to look like you want the "Cont'd" label to
appear if some bunch of subreport details spans a page
boundary, but maybe you are not talking about a bunch of
details and only want the label if a single detail is split
across two pages.

About the only thing I can say at this point is that the
lines of code I posted earlier can probably be used at the
appropriate places in the subreport to manage the label in
the main report. If there was something about using the
subreport's Report Header to make the label visible and the
sunreport's Report Footer to make it invisible that doesn't
do what you want, could you explain, via an example, What it
is doing and what you want it to do?
--
Marsh
MVP [MS Access]

I have put the desired effect into a statement:

"At the end of each page, [subreport detail] either continues or it does not.

If [subreport detail] will not continue, then [main report groupheader]
starts on the next page.

If [subreport detail] continues, label76 appears on the next page."

Hopefully there's code to accomplish that. I've also tried manipulating the
groupheader's settings, namely "Force New Page" and "Repeat Section."


Marshall Barton said:
What do you mean "filter out the duplicate product names"?

If it just that you don't want the product name to appear in
the detail, then remove that text box?

I got it to more or less where I want it by putting the product name in the
group header section, and all the other info, including the subreport, in the
detail section of the main report.

Now I have to filter out the duplicate product names that appear at the
bottom of some pages when the next product group starts at the top of the
next page.


:
I'm still thinking about the HasContinued issue.

To turn off the label when the sub report ends, use the
subreport Report Footer section's Format or Print event. If
the subreport does not have any data to display, just set
its height to 0.


Odniel wrote:
I tried applying the code to the subreport's report header On Format, and it
works to a certain extent. Now I have to figure out how to make Label76
invisible when the subreport does not flow to the next page.


Odniel wrote:
I have a report with a subreport in it. The page format is as follows:

Product ID [Subreport showing each item per product]

I would like "Contd from previous page" to show up at the top of each page
whenever the subreport flows into the next page. I have tried the following
code:

If Me.GroupHeader0.HasContinued = True Then
Me.Label76.Visible = True
Else
Me.Label76.Visible = False
End If

I have also tried the same code with "PageHeaderSection" instead of
"GroupHeader0." The result, time and again, is that the "Contd" message shows
up at random, not every instance, as is desired.

What can I do to have the message show up at every time the subreport flows
into the next page?


:
We need more specific information about the main report.

What section is the subreport in? If the subreport is in
the group header section, your posted code should work. If
it's in the detail section then your code may be doing what
you told it to do, but it would have nothing to do with the
subreport (Will/Has Continued only deals with a single
section, not a group of details).

Is the subreport the only item in the detail (or whatever)
section? If it is, then you can use the HasContinued
property of the detail section. If there is other stuff
that you don't want included under the "Cont'd" label, then
you will need another mechanism to accomplish theis goal.

Is there only the single subreport in the section or are
there other subreports, each with it's own "Cont'd" label?

In the more complex situations, I think one way to get what
you want might be to use the subreport itself to manage the
"Cont'd" label. Use the subreport's Report Header's Format
event to make the label visible:
Me.Parent.Label76.Visible = True
and similarly for making it invisible in the subreport's
Footer section.
 
O

Odniel

I'm sorry my statement sounds like something different. The situation is
exactly as you put it: "using the subreport's Report Header to make the
label visible and the
subreport's Report Footer to make it invisible."

Problem is i'm new to all this and i'm trying to learn, understand, and
apply simultaneously.

Marshall Barton said:
Your "statement" is not clarifying things for me. I thought
we were talking about the subreport being split across a
page boundary, for which I thought I provided and answer.
Then you said something about "duplicate" products that I
could not relate to anything we've discussed so far. Now
it's starting to look like you want the "Cont'd" label to
appear if some bunch of subreport details spans a page
boundary, but maybe you are not talking about a bunch of
details and only want the label if a single detail is split
across two pages.

About the only thing I can say at this point is that the
lines of code I posted earlier can probably be used at the
appropriate places in the subreport to manage the label in
the main report. If there was something about using the
subreport's Report Header to make the label visible and the
sunreport's Report Footer to make it invisible that doesn't
do what you want, could you explain, via an example, What it
is doing and what you want it to do?
--
Marsh
MVP [MS Access]

I have put the desired effect into a statement:

"At the end of each page, [subreport detail] either continues or it does not.

If [subreport detail] will not continue, then [main report groupheader]
starts on the next page.

If [subreport detail] continues, label76 appears on the next page."

Hopefully there's code to accomplish that. I've also tried manipulating the
groupheader's settings, namely "Force New Page" and "Repeat Section."


Marshall Barton said:
What do you mean "filter out the duplicate product names"?

If it just that you don't want the product name to appear in
the detail, then remove that text box?


Odniel wrote:
I got it to more or less where I want it by putting the product name in the
group header section, and all the other info, including the subreport, in the
detail section of the main report.

Now I have to filter out the duplicate product names that appear at the
bottom of some pages when the next product group starts at the top of the
next page.


:
I'm still thinking about the HasContinued issue.

To turn off the label when the sub report ends, use the
subreport Report Footer section's Format or Print event. If
the subreport does not have any data to display, just set
its height to 0.


Odniel wrote:
I tried applying the code to the subreport's report header On Format, and it
works to a certain extent. Now I have to figure out how to make Label76
invisible when the subreport does not flow to the next page.


Odniel wrote:
I have a report with a subreport in it. The page format is as follows:

Product ID [Subreport showing each item per product]

I would like "Contd from previous page" to show up at the top of each page
whenever the subreport flows into the next page. I have tried the following
code:

If Me.GroupHeader0.HasContinued = True Then
Me.Label76.Visible = True
Else
Me.Label76.Visible = False
End If

I have also tried the same code with "PageHeaderSection" instead of
"GroupHeader0." The result, time and again, is that the "Contd" message shows
up at random, not every instance, as is desired.

What can I do to have the message show up at every time the subreport flows
into the next page?


:
We need more specific information about the main report.

What section is the subreport in? If the subreport is in
the group header section, your posted code should work. If
it's in the detail section then your code may be doing what
you told it to do, but it would have nothing to do with the
subreport (Will/Has Continued only deals with a single
section, not a group of details).

Is the subreport the only item in the detail (or whatever)
section? If it is, then you can use the HasContinued
property of the detail section. If there is other stuff
that you don't want included under the "Cont'd" label, then
you will need another mechanism to accomplish theis goal.

Is there only the single subreport in the section or are
there other subreports, each with it's own "Cont'd" label?

In the more complex situations, I think one way to get what
you want might be to use the subreport itself to manage the
"Cont'd" label. Use the subreport's Report Header's Format
event to make the label visible:
Me.Parent.Label76.Visible = True
and similarly for making it invisible in the subreport's
Footer section.
 
M

Marshall Barton

I understand that things can be confusing with such a
powerful tool as Access, especially in the beginning.
However, these newsgroups are a text only communication
medium and clear explanations and examples of the problem
and hoped for solution are essential to a successful
outcome.

I can only say that I have suggested a solution that you
said worked in the subreport header and that you hadn't
tried the part in the report footer. Although I assume that
you tried something and that it's not doing what you want, I
still don't know what you did or what the result looks like.

To reiterate, place the following line of code in the
subreport Report Header section's Format event procedure:
Me.Parent.Label76.Visible = True

and add the following line to the subreport's Report Footer
section's Format event procedure:
Me.Parent.Label76.Visible = False
 
O

Odniel

It worked, with one small problem: The product name is being repeated
sometimes when the subreport does not flow to the next page. Two examples:

1) "Belvedere" (the product name) appears at the bottom of the page and at
the top of the next page when the group for "Belvedere" starts at the next
page.

2) The group for "Parallel" starts and ends on page 7, but the word Parallel
appears at the top of page 8, right on top of "Parasol" (the next product
name in sequence).

Other than those two instances, the code works great.


Marshall Barton said:
I understand that things can be confusing with such a
powerful tool as Access, especially in the beginning.
However, these newsgroups are a text only communication
medium and clear explanations and examples of the problem
and hoped for solution are essential to a successful
outcome.

I can only say that I have suggested a solution that you
said worked in the subreport header and that you hadn't
tried the part in the report footer. Although I assume that
you tried something and that it's not doing what you want, I
still don't know what you did or what the result looks like.

To reiterate, place the following line of code in the
subreport Report Header section's Format event procedure:
Me.Parent.Label76.Visible = True

and add the following line to the subreport's Report Footer
section's Format event procedure:
Me.Parent.Label76.Visible = False
--
Marsh
MVP [MS Access]

I'm sorry my statement sounds like something different. The situation is
exactly as you put it: "using the subreport's Report Header to make the
label visible and the
subreport's Report Footer to make it invisible."
 
M

Marshall Barton

I can only think of a couple of things that might cause that
effect.

One is that the subreport actually has a small bit of blank
space on the next page. This might happen if you have some
blank space after the last control in a section or if a
section (subreport Report Footer?) is blank. An easy way to
check for this is to temporarily set the BackColor of each
section to a different color so you can see exactly where
they start and end.

My other thought is that maybe there is a KeepTogether
property set somewhere that moves the subreport to the next
page after the attempt to format at the end of a page fails.
In this kind of situation, you can try using the Subreport
Report Header and Footer section Print event to run the code
(instead of the Format event).
--
Marsh
MVP [MS Access]

It worked, with one small problem: The product name is being repeated
sometimes when the subreport does not flow to the next page. Two examples:

1) "Belvedere" (the product name) appears at the bottom of the page and at
the top of the next page when the group for "Belvedere" starts at the next
page.

2) The group for "Parallel" starts and ends on page 7, but the word Parallel
appears at the top of page 8, right on top of "Parasol" (the next product
name in sequence).

Other than those two instances, the code works great.


Marshall Barton said:
I understand that things can be confusing with such a
powerful tool as Access, especially in the beginning.
However, these newsgroups are a text only communication
medium and clear explanations and examples of the problem
and hoped for solution are essential to a successful
outcome.

I can only say that I have suggested a solution that you
said worked in the subreport header and that you hadn't
tried the part in the report footer. Although I assume that
you tried something and that it's not doing what you want, I
still don't know what you did or what the result looks like.

To reiterate, place the following line of code in the
subreport Report Header section's Format event procedure:
Me.Parent.Label76.Visible = True

and add the following line to the subreport's Report Footer
section's Format event procedure:
Me.Parent.Label76.Visible = False
--
Marsh
MVP [MS Access]

I'm sorry my statement sounds like something different. The situation is
exactly as you put it: "using the subreport's Report Header to make the
label visible and the
subreport's Report Footer to make it invisible."
 
M

Marshall Barton

I don't know what you mean by "double spaced", but generally
you should open the report in design view and drag all the
controls as close to the top of the section as you want
them. Then, drag the bottom of the section higher than some
control. When you release the mouse button, the bottom of
the section will snap to its minimum allowable position.
This may be sufficient to prevent the problem we've been
working on all this time.

You can squeeze out unneeded white space between controls by
dragging some controls to where you really wanted them.
It's often best to start the selection of the controls by
first dragging a selection box around all the controls below
the white space so you can drag them up as a group without
disturbing their distance from each other.
--
Marsh
MVP [MS Access]

You're first thought is dead-on. The Main Report's GroupHeader is
double-spaced. How do I correct that?

Marshall Barton said:
I can only think of a couple of things that might cause that
effect.

One is that the subreport actually has a small bit of blank
space on the next page. This might happen if you have some
blank space after the last control in a section or if a
section (subreport Report Footer?) is blank. An easy way to
check for this is to temporarily set the BackColor of each
section to a different color so you can see exactly where
they start and end.

My other thought is that maybe there is a KeepTogether
property set somewhere that moves the subreport to the next
page after the attempt to format at the end of a page fails.
In this kind of situation, you can try using the Subreport
Report Header and Footer section Print event to run the code
(instead of the Format event).
--
Marsh
MVP [MS Access]

It worked, with one small problem: The product name is being repeated
sometimes when the subreport does not flow to the next page. Two examples:

1) "Belvedere" (the product name) appears at the bottom of the page and at
the top of the next page when the group for "Belvedere" starts at the next
page.

2) The group for "Parallel" starts and ends on page 7, but the word Parallel
appears at the top of page 8, right on top of "Parasol" (the next product
name in sequence).

Other than those two instances, the code works great.


:
I understand that things can be confusing with such a
powerful tool as Access, especially in the beginning.
However, these newsgroups are a text only communication
medium and clear explanations and examples of the problem
and hoped for solution are essential to a successful
outcome.

I can only say that I have suggested a solution that you
said worked in the subreport header and that you hadn't
tried the part in the report footer. Although I assume that
you tried something and that it's not doing what you want, I
still don't know what you did or what the result looks like.

To reiterate, place the following line of code in the
subreport Report Header section's Format event procedure:
Me.Parent.Label76.Visible = True

and add the following line to the subreport's Report Footer
section's Format event procedure:
Me.Parent.Label76.Visible = False
--
Marsh
MVP [MS Access]


Odniel wrote:
I'm sorry my statement sounds like something different. The situation is
exactly as you put it: "using the subreport's Report Header to make the
label visible and the
subreport's Report Footer to make it invisible."
 
O

Odniel

I did that, but the groupheader seems to sometimes go from the bottom of one
page to the top of the next page. I can tell that happens when I change the
background color.

That problem is fixed when I set "repeatsection" to "no" but that, in turn,
causes the label76 to disappear.



Marshall Barton said:
I don't know what you mean by "double spaced", but generally
you should open the report in design view and drag all the
controls as close to the top of the section as you want
them. Then, drag the bottom of the section higher than some
control. When you release the mouse button, the bottom of
the section will snap to its minimum allowable position.
This may be sufficient to prevent the problem we've been
working on all this time.

You can squeeze out unneeded white space between controls by
dragging some controls to where you really wanted them.
It's often best to start the selection of the controls by
first dragging a selection box around all the controls below
the white space so you can drag them up as a group without
disturbing their distance from each other.
--
Marsh
MVP [MS Access]

You're first thought is dead-on. The Main Report's GroupHeader is
double-spaced. How do I correct that?

Marshall Barton said:
I can only think of a couple of things that might cause that
effect.

One is that the subreport actually has a small bit of blank
space on the next page. This might happen if you have some
blank space after the last control in a section or if a
section (subreport Report Footer?) is blank. An easy way to
check for this is to temporarily set the BackColor of each
section to a different color so you can see exactly where
they start and end.

My other thought is that maybe there is a KeepTogether
property set somewhere that moves the subreport to the next
page after the attempt to format at the end of a page fails.
In this kind of situation, you can try using the Subreport
Report Header and Footer section Print event to run the code
(instead of the Format event).
--
Marsh
MVP [MS Access]


Odniel wrote:
It worked, with one small problem: The product name is being repeated
sometimes when the subreport does not flow to the next page. Two examples:

1) "Belvedere" (the product name) appears at the bottom of the page and at
the top of the next page when the group for "Belvedere" starts at the next
page.

2) The group for "Parallel" starts and ends on page 7, but the word Parallel
appears at the top of page 8, right on top of "Parasol" (the next product
name in sequence).

Other than those two instances, the code works great.


:
I understand that things can be confusing with such a
powerful tool as Access, especially in the beginning.
However, these newsgroups are a text only communication
medium and clear explanations and examples of the problem
and hoped for solution are essential to a successful
outcome.

I can only say that I have suggested a solution that you
said worked in the subreport header and that you hadn't
tried the part in the report footer. Although I assume that
you tried something and that it's not doing what you want, I
still don't know what you did or what the result looks like.

To reiterate, place the following line of code in the
subreport Report Header section's Format event procedure:
Me.Parent.Label76.Visible = True

and add the following line to the subreport's Report Footer
section's Format event procedure:
Me.Parent.Label76.Visible = False
--
Marsh
MVP [MS Access]


Odniel wrote:
I'm sorry my statement sounds like something different. The situation is
exactly as you put it: "using the subreport's Report Header to make the
label visible and the
subreport's Report Footer to make it invisible."
 
M

Marshall Barton

Try setting the group header section's KeepTogether property
to Yes.

I don't know if you want multple groups on a single page if
it will fit, but if each group is supposed to start on a new
page, then you might want to explore setting the group
header section's ForceNewPage property to Before Section
instead.
 
O

Odniel

I would like as many groups per page as possible.

Marshall Barton said:
Try setting the group header section's KeepTogether property
to Yes.

I don't know if you want multple groups on a single page if
it will fit, but if each group is supposed to start on a new
page, then you might want to explore setting the group
header section's ForceNewPage property to Before Section
instead.
--
Marsh
MVP [MS Access]

I did that, but the groupheader seems to sometimes go from the bottom of one
page to the top of the next page. I can tell that happens when I change the
background color.

That problem is fixed when I set "repeatsection" to "no" but that, in turn,
causes the label76 to disappear.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top