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. |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
Force the group footer to print on the first page
Hello,
Does anyone know how to force the group footer to print only on the first page of an Access 2007 Report? Thank you in advance. |
#2
|
|||
|
|||
Force the group footer to print on the first page
Hello "VBNovice10".
"VBNovice10" wrote: Hello, Does anyone know how to force the group footer to print only on the first page of an Access 2007 Report? 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) -- Regards, Wolfgang |
#3
|
|||
|
|||
Force the group footer to print on the first page
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. Thank you again. "Wolfgang Kais" wrote: Hello "VBNovice10". "VBNovice10" wrote: Hello, Does anyone know how to force the group footer to print only on the first page of an Access 2007 Report? 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) -- Regards, Wolfgang . |
#4
|
|||
|
|||
Force the group footer to print on the first page
"the code didn't work" does not convey much information
beyond the fact that you did not like the result. AFAICS, Wolfgang's code does what you asked for, so I am guessing that there may be a flaw in your question or terminology. Note that group footers only print at the end of the group and do not have much at all to do with where a page boundary happens to be. Maybe you really meant to say page footer?? -- Marsh MVP [MS Access] 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. "Wolfgang Kais" wrote: "VBNovice10" wrote: Does anyone know how to force the group footer to print only on the first page of an Access 2007 Report? 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) |
#5
|
|||
|
|||
Force the group footer to print on the first page
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 |
#6
|
|||
|
|||
Force the group footer to print on the first page
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 . |
#7
|
|||
|
|||
Force the group footer to print on the first page
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] |
#8
|
|||
|
|||
Force the group footer to print on the first page
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 |
Thread Tools | |
Display Modes | |
|
|