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

L

L Mehl

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).Visible = _
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
(e-mail address removed)
 
M

MGFoster

-----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

L Mehl

Thanks MG. I'll get busy.

Larry

MGFoster said:
-----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 said:
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).Visible = _
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
(e-mail address removed)
 

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

Similar Threads

Error in Count on Report 2

Top