By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,107 Members | 1,318 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,107 IT Pros & Developers. It's quick & easy.

Report footer on separate page; optionally hide it, reduce total page count by 1, and don't print last (blank) page

P: n/a
Different users of the app will want or not want to see report footer (
appears as a separate page).

I can make the section invisible with a DLookup of a Y or N value from a
'parameters' table

Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
Reports!rptValuationDetail.Section(acFooter).Visib le = _
DLookup("[z_text]", "sysparms", "[z_pname] = " & Chr(34) &
"printReportGrandTot" & Chr(34)) = "Y"
End Sub

The next thing to do is reduce the total page count by 1 and not create the
last page, based on the DLookup.

Can someone outline a way to do this or suggest a resource?

Thanks for any help.

Larry Mehl
me**@cyvest.com

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.518 / Virus Database: 316 - Release Date: 9/11/2003
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

You can change the report page count display by changing the TextBox
that contains the report's Pages property (usually in the Page Footer,
if you used the Report Wizard to create your report). You'd use the
same assignment as you used for the Footer.Visible property. E.g.:
Change the ControlSource of the Page number display to something like
this (all one line - watch for line-wrap):

="Page " & [Page] & " of " & [Pages] + DLookup("[z_text]", "sysparms",
"[z_pname] = 'printReportGrandTot'") = "Y"

You can use single-quotes inside double-quotes instead of using Chr$(34)
- - makes it easier to read.

What Happens: If the result of the DLookup() = "Y" is True (-1) the
Pages value will be reduced by ONE. If the result of the DLookup() =
"Y" is False (0) the Pages value will not be affected. E.g.:

Pages = 25, DLookup() returns True:

Pages + (-1) = 24

Pages = 25, DLookup() returns False:

Pages + (0) = 25

HTH,

MGFoster:::mgf
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP2eXsoechKqOuFEgEQIWcwCgmgleTWvcYZARbkhsB//bVXIPyrIAnA3d
YqvT1oCJ1T0zuqI9VgpCnluS
=0o5j
-----END PGP SIGNATURE-----
L Mehl wrote:

Different users of the app will want or not want to see report footer (
appears as a separate page).

I can make the section invisible with a DLookup of a Y or N value from a
'parameters' table

Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
Reports!rptValuationDetail.Section(acFooter).Visib le = _
DLookup("[z_text]", "sysparms", "[z_pname] = " & Chr(34) &
"printReportGrandTot" & Chr(34)) = "Y"
End Sub

The next thing to do is reduce the total page count by 1 and not create the
last page, based on the DLookup.

Can someone outline a way to do this or suggest a resource?

Thanks for any help.

Larry Mehl
me**@cyvest.com

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.518 / Virus Database: 316 - Release Date: 9/11/2003


Nov 12 '05 #2

P: n/a
Thanks MG. I'll get busy.

Larry

"MGFoster" <mg***@earthlink.net> wrote in message
news:3F***************@earthlink.net...
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

You can change the report page count display by changing the TextBox
that contains the report's Pages property (usually in the Page Footer,
if you used the Report Wizard to create your report). You'd use the
same assignment as you used for the Footer.Visible property. E.g.:
Change the ControlSource of the Page number display to something like
this (all one line - watch for line-wrap):

="Page " & [Page] & " of " & [Pages] + DLookup("[z_text]", "sysparms",
"[z_pname] = 'printReportGrandTot'") = "Y"

You can use single-quotes inside double-quotes instead of using Chr$(34)
- - makes it easier to read.

What Happens: If the result of the DLookup() = "Y" is True (-1) the
Pages value will be reduced by ONE. If the result of the DLookup() =
"Y" is False (0) the Pages value will not be affected. E.g.:

Pages = 25, DLookup() returns True:

Pages + (-1) = 24

Pages = 25, DLookup() returns False:

Pages + (0) = 25

HTH,

MGFoster:::mgf
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP2eXsoechKqOuFEgEQIWcwCgmgleTWvcYZARbkhsB//bVXIPyrIAnA3d
YqvT1oCJ1T0zuqI9VgpCnluS
=0o5j
-----END PGP SIGNATURE-----
L Mehl wrote:

Different users of the app will want or not want to see report footer (
appears as a separate page).

I can make the section invisible with a DLookup of a Y or N value from a
'parameters' table

Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer) Reports!rptValuationDetail.Section(acFooter).Visib le = _
DLookup("[z_text]", "sysparms", "[z_pname] = " & Chr(34) &
"printReportGrandTot" & Chr(34)) = "Y"
End Sub

The next thing to do is reduce the total page count by 1 and not create the last page, based on the DLookup.

Can someone outline a way to do this or suggest a resource?

Thanks for any help.

Larry Mehl
me**@cyvest.com

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.518 / Virus Database: 316 - Release Date: 9/11/2003

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.518 / Virus Database: 316 - Release Date: 9/11/2003
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.