Help please with Report/subreport

T

TotallyConfused

Hi I hope this can be done. I have a main report and I need to add a
subreport. However, this subreport just needs to be attached to the main
report at the end of any data in the main report. the subreport does not
have to be linked with any records. This subreport is just informational.
How can I add this subreport and have it show at the end of the main report
but not share the main report's header or footer? I hope I make sense. I
would really appreciate any help that anyone can provide. Thank you.
 
R

Rob Parker

Apart from the obvious point of not having anything in the Link Master/Child
fields ...

If you put the subreport in the report's footer, it will appear at the end
of the main report. Then, if there's anything else in the report footer,
you can put a page break control before the subreport to force it to a
separate page. However, if your report contains a page footer, this will
still appear on the last page.

That's my off-the-top-of-my-head answer. Maybe one of the MVPs has a
smarter way ;-)

HTH,

Rob
 
J

John Spencer

AND if you want to hide the report's page header or page footer you can do
so with a bit of vba code

If you are not tracking the number of pages in the footer (page of pages),
then add a control to the page footer and set its source to =[Pages] and its
visible property to false if you don't want to see the value.

Add VBA to the Page footer to set the Page footer's visibility to False -
something like the following


Private Sub PageFooter_Format(Cancel As Integer, FormatCount As Integer)
If Me.Page = Me.Pages Then
Me.Section(acPageFooter).Visible = False
Else
Me.Section(acPageFooter).Visible = True
End If
End Sub

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
T

TotallyConfused

This is not working is there anything else I can do eliminate the Main report
footer and header to be visible??

John Spencer said:
AND if you want to hide the report's page header or page footer you can do
so with a bit of vba code

If you are not tracking the number of pages in the footer (page of pages),
then add a control to the page footer and set its source to =[Pages] and its
visible property to false if you don't want to see the value.

Add VBA to the Page footer to set the Page footer's visibility to False -
something like the following


Private Sub PageFooter_Format(Cancel As Integer, FormatCount As Integer)
If Me.Page = Me.Pages Then
Me.Section(acPageFooter).Visible = False
Else
Me.Section(acPageFooter).Visible = True
End If
End Sub

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Rob Parker said:
Apart from the obvious point of not having anything in the Link
Master/Child fields ...

If you put the subreport in the report's footer, it will appear at the end
of the main report. Then, if there's anything else in the report footer,
you can put a page break control before the subreport to force it to a
separate page. However, if your report contains a page footer, this will
still appear on the last page.

That's my off-the-top-of-my-head answer. Maybe one of the MVPs has a
smarter way ;-)

HTH,

Rob
 
D

Duane Hookom

Are you sure it doesn't work? You haven't told us why you think it isn't
working. What is the exact code that you added to your report?
--
Duane Hookom
Microsoft Access MVP
If I have helped you, please help me by donating to UCP
http://www.access.hookom.net/UCP/Default.htm


TotallyConfused said:
This is not working is there anything else I can do eliminate the Main report
footer and header to be visible??

John Spencer said:
AND if you want to hide the report's page header or page footer you can do
so with a bit of vba code

If you are not tracking the number of pages in the footer (page of pages),
then add a control to the page footer and set its source to =[Pages] and its
visible property to false if you don't want to see the value.

Add VBA to the Page footer to set the Page footer's visibility to False -
something like the following


Private Sub PageFooter_Format(Cancel As Integer, FormatCount As Integer)
If Me.Page = Me.Pages Then
Me.Section(acPageFooter).Visible = False
Else
Me.Section(acPageFooter).Visible = True
End If
End Sub

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Rob Parker said:
Apart from the obvious point of not having anything in the Link
Master/Child fields ...

If you put the subreport in the report's footer, it will appear at the end
of the main report. Then, if there's anything else in the report footer,
you can put a page break control before the subreport to force it to a
separate page. However, if your report contains a page footer, this will
still appear on the last page.

That's my off-the-top-of-my-head answer. Maybe one of the MVPs has a
smarter way ;-)

HTH,

Rob

message Hi I hope this can be done. I have a main report and I need to add a
subreport. However, this subreport just needs to be attached to the main
report at the end of any data in the main report. the subreport does not
have to be linked with any records. This subreport is just
informational.
How can I add this subreport and have it show at the end of the main
report
but not share the main report's header or footer? I hope I make sense.
I
would really appreciate any help that anyone can provide. Thank you.
 
T

TotallyConfused

Thank you for responding. Since it was not working, I took the code off and
put the subreport in the Report Footer (I had previuously working on the page
header/footer of the main report). This seems to work just fine. However,
although the main report header does not show in the subreport, the subreport
has its own header that should show on additional pages of the subreport. It
is only coming up on the first page. How can I fix this?? ( I have tried the
report and page header of the subreport and still only get it to show on the
first page of subject) Thank you for all of your help.

Duane Hookom said:
Are you sure it doesn't work? You haven't told us why you think it isn't
working. What is the exact code that you added to your report?
--
Duane Hookom
Microsoft Access MVP
If I have helped you, please help me by donating to UCP
http://www.access.hookom.net/UCP/Default.htm


TotallyConfused said:
This is not working is there anything else I can do eliminate the Main report
footer and header to be visible??

John Spencer said:
AND if you want to hide the report's page header or page footer you can do
so with a bit of vba code

If you are not tracking the number of pages in the footer (page of pages),
then add a control to the page footer and set its source to =[Pages] and its
visible property to false if you don't want to see the value.

Add VBA to the Page footer to set the Page footer's visibility to False -
something like the following


Private Sub PageFooter_Format(Cancel As Integer, FormatCount As Integer)
If Me.Page = Me.Pages Then
Me.Section(acPageFooter).Visible = False
Else
Me.Section(acPageFooter).Visible = True
End If
End Sub

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Apart from the obvious point of not having anything in the Link
Master/Child fields ...

If you put the subreport in the report's footer, it will appear at the end
of the main report. Then, if there's anything else in the report footer,
you can put a page break control before the subreport to force it to a
separate page. However, if your report contains a page footer, this will
still appear on the last page.

That's my off-the-top-of-my-head answer. Maybe one of the MVPs has a
smarter way ;-)

HTH,

Rob

message Hi I hope this can be done. I have a main report and I need to add a
subreport. However, this subreport just needs to be attached to the main
report at the end of any data in the main report. the subreport does not
have to be linked with any records. This subreport is just
informational.
How can I add this subreport and have it show at the end of the main
report
but not share the main report's header or footer? I hope I make sense.
I
would really appreciate any help that anyone can provide. Thank you.
 
D

Duane Hookom

If you want a "page header" in a subreport:
1) create a new primary sorting and grouping level
2) set its field/expression to a constant like:
=1
3) display the =1 group header section
4) set the =1 group header Repeat Section property to Yes

--
Duane Hookom
Microsoft Access MVP
If I have helped you, please help me by donating to UCP
http://www.access.hookom.net/UCP/Default.htm


TotallyConfused said:
Thank you for responding. Since it was not working, I took the code off and
put the subreport in the Report Footer (I had previuously working on the page
header/footer of the main report). This seems to work just fine. However,
although the main report header does not show in the subreport, the subreport
has its own header that should show on additional pages of the subreport. It
is only coming up on the first page. How can I fix this?? ( I have tried the
report and page header of the subreport and still only get it to show on the
first page of subject) Thank you for all of your help.

Duane Hookom said:
Are you sure it doesn't work? You haven't told us why you think it isn't
working. What is the exact code that you added to your report?
--
Duane Hookom
Microsoft Access MVP
If I have helped you, please help me by donating to UCP
http://www.access.hookom.net/UCP/Default.htm


TotallyConfused said:
This is not working is there anything else I can do eliminate the Main report
footer and header to be visible??

:

AND if you want to hide the report's page header or page footer you can do
so with a bit of vba code

If you are not tracking the number of pages in the footer (page of pages),
then add a control to the page footer and set its source to =[Pages] and its
visible property to false if you don't want to see the value.

Add VBA to the Page footer to set the Page footer's visibility to False -
something like the following


Private Sub PageFooter_Format(Cancel As Integer, FormatCount As Integer)
If Me.Page = Me.Pages Then
Me.Section(acPageFooter).Visible = False
Else
Me.Section(acPageFooter).Visible = True
End If
End Sub

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Apart from the obvious point of not having anything in the Link
Master/Child fields ...

If you put the subreport in the report's footer, it will appear at the end
of the main report. Then, if there's anything else in the report footer,
you can put a page break control before the subreport to force it to a
separate page. However, if your report contains a page footer, this will
still appear on the last page.

That's my off-the-top-of-my-head answer. Maybe one of the MVPs has a
smarter way ;-)

HTH,

Rob

message Hi I hope this can be done. I have a main report and I need to add a
subreport. However, this subreport just needs to be attached to the main
report at the end of any data in the main report. the subreport does not
have to be linked with any records. This subreport is just
informational.
How can I add this subreport and have it show at the end of the main
report
but not share the main report's header or footer? I hope I make sense.
I
would really appreciate any help that anyone can provide. Thank you.
 

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