A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Footer only to appear once!



 
 
Thread Tools Display Modes
  #21  
Old September 21st, 2008, 08:59 AM posted to microsoft.public.access.reports
Bob Vance
external usenet poster
 
Posts: 726
Default Footer only to appear once!

Ok got the =1 Footer and the page break [pgEject]
But my subReport is in the Detail Section of the report!
Thanks Bob

"Bob Vance" wrote in message
...
Marshall when I add a group it always goes to "=1 Header" is that correct
and where do I find yes for the group footer, remembering I am using 2007
Thanks Bob

"Marshall Barton" wrote in message
...
Bob Vance wrote:

Marshall, Detail can grow yes
Sub report can grow No.


Well shucks, that rules out several ideas I was
contemplating.

BUT, I finally stumbled over something that works in my
tests (using A2003). It's a little strange so pay attention
;-)

First, add a group (View menu - Sorting and Grouping) using
the expression =1. Specify Yes for the Group Footer.

Add a Page Break control (named pgEject) at the top of the
group footer section. (The Height of the group footer
section doesn't seem to matter!?)

Use the View menu to display the Report Footer section and
move everything you have in the page footer (the subreport?)
to the Report Footer section. Make the page footer
invisible or set its Height to 0.

Then put this code in the report's module. (Make sure you
remove any residual code from our earlier attempts.)

Const TPI As Long = 1440
Const PAPERHEIGHT As Long = 11 * TPI
Const BOTTOMMARGIN As Long = 0.5 * TPI

Private Sub GroupFooter1_Format(Cancel As Integer,
FormatCount As Integer)

Dim FooterTop As Long

FooterTop = PAPERHEIGHT - BOTTOMMARGIN _
- Me.Section(2).Height
If Me.Top = FooterTop Then
Me.pgEject.Visible = True
Else
Me.pgEject.Visible = False
Me.GroupFooter1.Height = FooterTop - Me.Top
End If
End Sub

Double check that the group footer's OnFormat property is
set to [Event Procedure]

Do not ask me to explain why this worked. I have no idea
what Access is doing when it executes the true part of the
If when FormatCount=1 and the Else part when FormatCount=2.

--
Marsh
MVP [MS Access]





  #22  
Old September 21st, 2008, 09:19 AM posted to microsoft.public.access.reports
Bob Vance
external usenet poster
 
Posts: 726
Default Footer only to appear once!

Marshall do you mind if I send you my db so as you could please do a fix on
my report?
Regards Bob (thanks for your help)

"Bob Vance" wrote in message
...
Ok got the =1 Footer and the page break [pgEject]
But my subReport is in the Detail Section of the report!
Thanks Bob

"Bob Vance" wrote in message
...
Marshall when I add a group it always goes to "=1 Header" is that correct
and where do I find yes for the group footer, remembering I am using 2007
Thanks Bob

"Marshall Barton" wrote in message
...
Bob Vance wrote:

Marshall, Detail can grow yes
Sub report can grow No.


Well shucks, that rules out several ideas I was
contemplating.

BUT, I finally stumbled over something that works in my
tests (using A2003). It's a little strange so pay attention
;-)

First, add a group (View menu - Sorting and Grouping) using
the expression =1. Specify Yes for the Group Footer.

Add a Page Break control (named pgEject) at the top of the
group footer section. (The Height of the group footer
section doesn't seem to matter!?)

Use the View menu to display the Report Footer section and
move everything you have in the page footer (the subreport?)
to the Report Footer section. Make the page footer
invisible or set its Height to 0.

Then put this code in the report's module. (Make sure you
remove any residual code from our earlier attempts.)

Const TPI As Long = 1440
Const PAPERHEIGHT As Long = 11 * TPI
Const BOTTOMMARGIN As Long = 0.5 * TPI

Private Sub GroupFooter1_Format(Cancel As Integer,
FormatCount As Integer)

Dim FooterTop As Long

FooterTop = PAPERHEIGHT - BOTTOMMARGIN _
- Me.Section(2).Height
If Me.Top = FooterTop Then
Me.pgEject.Visible = True
Else
Me.pgEject.Visible = False
Me.GroupFooter1.Height = FooterTop - Me.Top
End If
End Sub

Double check that the group footer's OnFormat property is
set to [Event Procedure]

Do not ask me to explain why this worked. I have no idea
what Access is doing when it executes the true part of the
If when FormatCount=1 and the Else part when FormatCount=2.

--
Marsh
MVP [MS Access]







  #23  
Old September 21st, 2008, 03:11 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Footer only to appear once!

Bob Vance wrote:
Marshall do you mind if I send you my db so as you could please do a fix on
my report?

Wouldn't do any good if I minded or not. My A2007 machine
is not setup to network to anything (don't ask) so I would
have a ton of problems getting setup to look at it.


"Bob Vance" wrote
Ok got the =1 Footer and the page break [pgEject]
But my subReport is in the Detail Section of the report!

Whatever. Just move the stuff you had in the page footer to
the group footer.

"Bob Vance" wrote
I am using 2007


No guarantees. As I said, I don't dully understand why it
worked. A different version of Access may do some part of
it differently.

--
Marsh
MVP [MS Access]
  #24  
Old September 21st, 2008, 11:52 PM posted to microsoft.public.access.reports
Bob Vance
external usenet poster
 
Posts: 726
Default Footer only to appear once!

Marshall all I can say "BRILLIANT" and Im not going to ask you how you did
it!
Much Appreciated for your time and effort with my major problem Thanks Bob

"Marshall Barton" wrote in message
news
Bob Vance wrote:
Marshall do you mind if I send you my db so as you could please do a fix
on
my report?

Wouldn't do any good if I minded or not. My A2007 machine
is not setup to network to anything (don't ask) so I would
have a ton of problems getting setup to look at it.


"Bob Vance" wrote
Ok got the =1 Footer and the page break [pgEject]
But my subReport is in the Detail Section of the report!

Whatever. Just move the stuff you had in the page footer to
the group footer.

"Bob Vance" wrote
I am using 2007

No guarantees. As I said, I don't dully understand why it
worked. A different version of Access may do some part of
it differently.

--
Marsh
MVP [MS Access]



  #25  
Old September 22nd, 2008, 01:13 AM posted to microsoft.public.access.reports
Bob Vance
external usenet poster
 
Posts: 726
Default Footer only to appear once!

Marshall I also have a Batch print report that is similar to my other
report, It just lets me print all Owners statements with out selecting
individual Owners
The problem here that it has a "group on OwnerID"
It also has an OwnerID Header and a OwnerID Footer with nothing in the
footer

How can I put your expression into this report.......Thanks Bob

"Bob Vance" wrote in message
...
Marshall all I can say "BRILLIANT" and Im not going to ask you how you
did it!
Much Appreciated for your time and effort with my major problem Thanks Bob

"Marshall Barton" wrote in message
news
Bob Vance wrote:
Marshall do you mind if I send you my db so as you could please do a fix
on
my report?

Wouldn't do any good if I minded or not. My A2007 machine
is not setup to network to anything (don't ask) so I would
have a ton of problems getting setup to look at it.


"Bob Vance" wrote
Ok got the =1 Footer and the page break [pgEject]
But my subReport is in the Detail Section of the report!

Whatever. Just move the stuff you had in the page footer to
the group footer.

"Bob Vance" wrote
I am using 2007

No guarantees. As I said, I don't dully understand why it
worked. A different version of Access may do some part of
it differently.

--
Marsh
MVP [MS Access]





  #26  
Old September 22nd, 2008, 01:45 AM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Footer only to appear once!

Bob Vance wrote:

Marshall all I can say "BRILLIANT" and Im not going to ask you how you did
it!
Much Appreciated for your time and effort with my major problem Thanks Bob



You're welcome. It was a seeerrrrious challenge and quite
interesting ;-)

HOW I did it is no secret, a lot of educated guesses and
trial and error. WHY it works is a completely separate
issue that I can not pretend to fully understand ;-)

Thank you for posting back that you got it to work in A2007.
I really didn't want to reproduce the whole scenario on my
quarantined A2007 machine.

--
Marsh
MVP [MS Access]
  #27  
Old September 22nd, 2008, 02:00 AM posted to microsoft.public.access.reports
Bob Vance
external usenet poster
 
Posts: 726
Default Footer only to appear once!

Marshall I also have a Batch print report that is similar to my other
report, It just lets me print all Owners statements with out selecting
individual Owners
The problem here that it has a "group on OwnerID"
It also has an OwnerID Header and a OwnerID Footer with nothing in the
footer

How can I put your expression into this report.......Thanks Bob


"Marshall Barton" wrote in message
...
Bob Vance wrote:

Marshall all I can say "BRILLIANT" and Im not going to ask you how you
did
it!
Much Appreciated for your time and effort with my major problem Thanks Bob



You're welcome. It was a seeerrrrious challenge and quite
interesting ;-)

HOW I did it is no secret, a lot of educated guesses and
trial and error. WHY it works is a completely separate
issue that I can not pretend to fully understand ;-)

Thank you for posting back that you got it to work in A2007.
I really didn't want to reproduce the whole scenario on my
quarantined A2007 machine.

--
Marsh
MVP [MS Access]



  #28  
Old September 22nd, 2008, 02:39 AM posted to microsoft.public.access.reports
Bob Vance
external usenet poster
 
Posts: 726
Default Footer only to appear once!

This might help Marshall , The last Expression is yours .........Thanks Bob
http://viewmorepics.myspace.com/inde...ageID=30967536
http://viewmorepics.myspace.com/inde...ageID=30967846

"Bob Vance" wrote in message
...
Marshall I also have a Batch print report that is similar to my other
report, It just lets me print all Owners statements with out selecting
individual Owners
The problem here that it has a "group on OwnerID"
It also has an OwnerID Header and a OwnerID Footer with nothing in the
footer

How can I put your expression into this report.......Thanks Bob


"Marshall Barton" wrote in message
...
Bob Vance wrote:

Marshall all I can say "BRILLIANT" and Im not going to ask you how you
did
it!
Much Appreciated for your time and effort with my major problem Thanks
Bob



You're welcome. It was a seeerrrrious challenge and quite
interesting ;-)

HOW I did it is no secret, a lot of educated guesses and
trial and error. WHY it works is a completely separate
issue that I can not pretend to fully understand ;-)

Thank you for posting back that you got it to work in A2007.
I really didn't want to reproduce the whole scenario on my
quarantined A2007 machine.

--
Marsh
MVP [MS Access]





  #29  
Old September 23rd, 2008, 07:29 PM posted to microsoft.public.access.reports
gladys lane
external usenet poster
 
Posts: 4
Default Footer only to appear once!



"Marshall Barton" wrote in message
...
Bob Vance wrote:

Marshall, Detail can grow yes
Sub report can grow No.


Well shucks, that rules out several ideas I was
contemplating.

BUT, I finally stumbled over something that works in my
tests (using A2003). It's a little strange so pay attention
;-)

First, add a group (View menu - Sorting and Grouping) using
the expression =1. Specify Yes for the Group Footer.

Add a Page Break control (named pgEject) at the top of the
group footer section. (The Height of the group footer
section doesn't seem to matter!?)

Use the View menu to display the Report Footer section and
move everything you have in the page footer (the subreport?)
to the Report Footer section. Make the page footer
invisible or set its Height to 0.

Then put this code in the report's module. (Make sure you
remove any residual code from our earlier attempts.)

Const TPI As Long = 1440
Const PAPERHEIGHT As Long = 11 * TPI
Const BOTTOMMARGIN As Long = 0.5 * TPI

Private Sub GroupFooter1_Format(Cancel As Integer,
FormatCount As Integer)

Dim FooterTop As Long

FooterTop = PAPERHEIGHT - BOTTOMMARGIN _
- Me.Section(2).Height
If Me.Top = FooterTop Then
Me.pgEject.Visible = True
Else
Me.pgEject.Visible = False
Me.GroupFooter1.Height = FooterTop - Me.Top
End If
End Sub

Double check that the group footer's OnFormat property is
set to [Event Procedure]

Do not ask me to explain why this worked. I have no idea
what Access is doing when it executes the true part of the
If when FormatCount=1 and the Else part when FormatCount=2.

--
Marsh
MVP [MS Access]


  #30  
Old September 23rd, 2008, 07:36 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Footer only to appear once!

Bob Vance wrote:

Marshall I also have a Batch print report that is similar to my other
report, It just lets me print all Owners statements with out selecting
individual Owners
The problem here that it has a "group on OwnerID"
It also has an OwnerID Header and a OwnerID Footer with nothing in the
footer



I am having trouble finding time to set up a test for that
scenario. Rather than just leave you hanging I'll throw out
an idea that I would try first.

Start with a copy of the report you got to work earlier.
Then make all changes to the copy and, if we can get it to
work for this new report, I expect that you should be able
to use this new report for both scenarios.

Move the report footer stuff to your OwnerID group footer
and get rid of the report footer. Set this group footer
section's Name to OwnerFooter.

Add a second group with footer on the OwnerID field and set
this footer section's Name to Spacer. Move the code and
page break control we had in the =1 group in the other
report to this new group's footer. Get rid of the =1 group.

Change the code in the Spacer footer section to use thenew
section names instead of the generic names Access supplied:

Const TPI As Long = 1440
Const PAPERHEIGHT As Long = 11 * TPI
Const BOTTOMMARGIN As Long = 0.5 * TPI

Private Sub GroupFooter1_Format(Cancel As Integer,
FormatCount As Integer)
Dim FooterTop As Long
FooterTop = PAPERHEIGHT - BOTTOMMARGIN _
- Me.OwnerFooter.Height
If Me.Top = FooterTop Then
Me.pgEject.Visible = True
Else
Me.pgEject.Visible = False
Me.Spacer.Height = FooterTop - Me.Top
End If
End Sub

--
Marsh
MVP [MS Access]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:07 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.