From: VBNovice10 on
My report is based off of a current form we manually create through Microsoft
Word for every customer. Each customer may have anywhere from 1 to >300
items, so the detail section length varies. But I want to populate the
report through Access from my database to expedite the former form creation.

My report has a report header with a logo, a page header with recurring data
on each page, a detail section with rows of data populated by rows in my
database, a group footer, a page footer with page numbers, and a report
footer which takes up the entire last page.

I was hoping there was a code/method to force the group footer to always
print on the "first page" only regardless of the number of rows in the detail
section. The main question is can a group footer be forced to print in the
middle of a group section?

Thank you for your help. Please let me know if you need more detail.

"Wolfgang Kais" wrote:

> Hello.
>
> "VBNovice10" wrote:
> >>> Does anyone know how to force the group footer to print only on the
> >>> first page of an Access 2007 Report?
>
> Wolfgang Kais wrote:
> >> You could try to change the visibility of the group footer section
> >> in it's format event, using a line like this:
> >>
> >> Me.NameOfTheGroupFooterSection.Visible = (Me.Page = 1)
>
> "VBNovice10" wrote:
> > Thank you for your help, but the code didn't work. The group footer
> > still did not appear on the first page. I may have to reconsider my
> > report design.
>
> As Marshall Barton said, make sure that the section you associate the
> code with is indeed the section you want to hide/display, and that the
> name of the section used in code is correct. Always keep in mind that
> a group footer will be displayd below the last detail record of
> the group (on the same page, provided that there is enough space).
> You could also verify the ForceNewPage property of the group footer.
> Did you accidently set this property to "before section"?
> You said "the group footer still did not appear on the first page".
> Still? I thought that is WAS displayed and you wanted it to be displayed
> ONLY on the first page? What is the page number of the desired page?
>
> --
> Regards,
> Wolfgang
>
>
> .
>
From: Marshall Barton on
VBNovice10 wrote:

>My report is based off of a current form we manually create through Microsoft
>Word for every customer. Each customer may have anywhere from 1 to >300
>items, so the detail section length varies. But I want to populate the
>report through Access from my database to expedite the former form creation.
>
>My report has a report header with a logo, a page header with recurring data
>on each page, a detail section with rows of data populated by rows in my
>database, a group footer, a page footer with page numbers, and a report
>footer which takes up the entire last page.
>
>I was hoping there was a code/method to force the group footer to always
>print on the "first page" only regardless of the number of rows in the detail
>section. The main question is can a group footer be forced to print in the
>middle of a group section?
>

No. If the group footer displays some kinds of totals for
the group, those totals may not have been calculated until
the last detail has been processed. In that case it would
not make sense to try to print that kind of total the way
you want.

In some situations, a report can be made to use the page
footer to display something different (not running sum
totals) on specific pages, but this can get kind of
messy/tricky. If there is some way to fake what you want,
we would have to know a whole bunch of details about what
you need to display in this simulated "group footer".

--
Marsh
MVP [MS Access]
From: KenSheridan via AccessMonster.com on
A footer won't print in the middle of a section as such. The best you could
probably do would be to print the 'footer' data in the page footer of the
first page. Instead of a group footer create a group header and put the
controls containing data currently in the group footer in it, all contiguous
with the top of the section. Set the height of each control to zero and the
height of the group header itself to zero.

Next, in the page footer add the necessary labels and a set of unbound text
box controls which reference the controls in the group header, e.g.

=[SomeControl]
=[SomeOtherControl]

and so on.

In the page footer's Format event procedure hide the controls in the page
footer after page 1 with:

Me.[SomeLabel].Visible = (Page = 1)
Me.[txtSomeControl].Visible = (Page = 1)
Me.[SomeOtherLabel].Visible = (Page = 1)
Me.[txtSomeOtherControl].Visible = (Page = 1)

and so on.

This does of course mean that the page footer needs to be deep enough to hold
the controls, and as the page footer has no CanShrink property its depth will
be the same on subsequent pages, so you'll have some empty white space
between the bottom of the last detail on the page and the page number.

The above does what you asked in your first post, which is to show it only on
the "first page of an Access 2007 Report". However, I wonder whether you
really want it on the first page of each group? If so you'd need a slightly
different approach:

First declare a variable in the report's module's Declarations area:

Dim intPage As Integer

Then in the group header's Format event procedure assign the value of the
current page to the variable:

intPage = Page

Then in the page footer's Format event procedure show the controls only if
the page is the first page of a group:

Me.[txtSomeControl].Visible = (Page = intPage)
Me.[txtSomeOtherControl].Visible = (Page = intPage)

and so on.

Ken Sheridan
Stafford, England

VBNovice10 wrote:
>My report is based off of a current form we manually create through Microsoft
>Word for every customer. Each customer may have anywhere from 1 to >300
>items, so the detail section length varies. But I want to populate the
>report through Access from my database to expedite the former form creation.
>
>My report has a report header with a logo, a page header with recurring data
>on each page, a detail section with rows of data populated by rows in my
>database, a group footer, a page footer with page numbers, and a report
>footer which takes up the entire last page.
>
>I was hoping there was a code/method to force the group footer to always
>print on the "first page" only regardless of the number of rows in the detail
>section. The main question is can a group footer be forced to print in the
>middle of a group section?
>
>Thank you for your help. Please let me know if you need more detail.
>
>> Hello.
>>
>[quoted text clipped - 21 lines]
>> Still? I thought that is WAS displayed and you wanted it to be displayed
>> ONLY on the first page? What is the page number of the desired page?

--
Message posted via http://www.accessmonster.com

From: VBNovice10 on
Thank you for your quick response. As far as faking it, here are some
details of my report. My current group footer contains 4 signature blocks
tracking items exchanged from one person to another person. There are five
columns (Item#, Date, Released By, Received By, and Purpose, respectively).
The 4 rows track four different exchanges between individuals. The
information in this section is provided post printing and the framework is
needed only on the bottom of the first page. There is no computing or
calculations required to be filled into this section prior to printing.

Please let me know if you need further information or if my description is
unclear.

Thank you.

"Marshall Barton" wrote:

> VBNovice10 wrote:
>
> >My report is based off of a current form we manually create through Microsoft
> >Word for every customer. Each customer may have anywhere from 1 to >300
> >items, so the detail section length varies. But I want to populate the
> >report through Access from my database to expedite the former form creation.
> >
> >My report has a report header with a logo, a page header with recurring data
> >on each page, a detail section with rows of data populated by rows in my
> >database, a group footer, a page footer with page numbers, and a report
> >footer which takes up the entire last page.
> >
> >I was hoping there was a code/method to force the group footer to always
> >print on the "first page" only regardless of the number of rows in the detail
> >section. The main question is can a group footer be forced to print in the
> >middle of a group section?
> >
>
> No. If the group footer displays some kinds of totals for
> the group, those totals may not have been calculated until
> the last detail has been processed. In that case it would
> not make sense to try to print that kind of total the way
> you want.
>
> In some situations, a report can be made to use the page
> footer to display something different (not running sum
> totals) on specific pages, but this can get kind of
> messy/tricky. If there is some way to fake what you want,
> we would have to know a whole bunch of details about what
> you need to display in this simulated "group footer".
>
> --
> Marsh
> MVP [MS Access]
> .
>
From: Marshall Barton on
So all you need is a row of labels and 4 rows of empty boxes
(plus the pagemumber?), right? If so, you can do what Ken
suggested.

If you need to reduce the space used by the page footer to
just the page number on the other pages, then that's where
it gets tricky. One rule about changing the height of the
page footer section is that it needs to be done in a page
**header** event procedure. Another thing is that you can
not reduce the height of a section so the section's bottom
is above the bottom of the lowest control in the section.
This means that the controls have to be moved up in the
section first (the opposite is true when you move a control
down in the section). A vague outline of the page header
code would be something like:

Const ROWHGT = .25*1440 ' 1/4 inch each
Select Case Me.Page
Case 1
Me.Section(4).Height = 6*ROWHGT
Me.txtPageNum.Top = 5*ROWHGT
Me.lblItem.Visible = True
Me.lblDate.Visible = True
. . .
For k = 1 to 4
Me("boxItem" & k).Visible = True
Me("boxItem" & k).Top = k*ROWHGT
Me("boxDate" & k).Visible = True
Me("boxDate" & k).Top = k*ROWHGT
. . .
Next k
Case 2
Me.txtPageNum.Top = 0
Me.lblItem.Visible = False
Me.lblDate.Visible = False
. . .
For k = 1 to 4
Me("boxItem" & k).Visible = False
Me("boxItem" & k).Top = 0
Me("boxDate" & k).Visible = False
Me("boxDate" & k).Top = 0
. . .
Next k
Me.Section(4).Height = ROWHGT
End Select
--
Marsh
MVP [MS Access]


VBNovice10 wrote:
>Thank you for your quick response. As far as faking it, here are some
>details of my report. My current group footer contains 4 signature blocks
>tracking items exchanged from one person to another person. There are five
>columns (Item#, Date, Released By, Received By, and Purpose, respectively).
>The 4 rows track four different exchanges between individuals. The
>information in this section is provided post printing and the framework is
>needed only on the bottom of the first page. There is no computing or
>calculations required to be filled into this section prior to printing.
>
>
>"Marshall Barton" wrote:
>
>> VBNovice10 wrote:
>>
>> >My report is based off of a current form we manually create through Microsoft
>> >Word for every customer. Each customer may have anywhere from 1 to >300
>> >items, so the detail section length varies. But I want to populate the
>> >report through Access from my database to expedite the former form creation.
>> >
>> >My report has a report header with a logo, a page header with recurring data
>> >on each page, a detail section with rows of data populated by rows in my
>> >database, a group footer, a page footer with page numbers, and a report
>> >footer which takes up the entire last page.
>> >
>> >I was hoping there was a code/method to force the group footer to always
>> >print on the "first page" only regardless of the number of rows in the detail
>> >section. The main question is can a group footer be forced to print in the
>> >middle of a group section?