472,779 Members | 2,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,779 software developers and data experts.

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

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
2 4457
-----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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Galina | last post by:
Hello I have a report, which lists records. Each record has money paid field. Money paid can be 0 or not 0. I calculate and print summary of money for a group in the group footer, as well as...
1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
3
by: Grim Reaper | last post by:
I know this is probably an easy question, but I could not find/figure it out. Basically, I am printing mailing labels with a "Sorting/Grouping" section that groups the label types together....
6
by: Mike Conklin | last post by:
This one really has me going. Probably something silly. I'm using dcount for a report to determine the number of different types of tests proctored in a semester. My report is based on a...
4
by: Nhmiller | last post by:
Access seems to always generate a second page, which is blank, to my one page report. How do I delete the second page? Thanks. Neil Cat Paintings At Carol Wilson Gallery...
4
by: Trevor Best | last post by:
I have a report that's fairly simple, page headers and footers, detail has a subreport in (can vary in length). The customer wanted a signature block for them, their client and 3rd party. This was...
13
by: Greg | last post by:
Most suggestions on this topic recommend to use a page footer and make it visible only on the last page. My problem is that the footer is half of the height of a page which means the detail would...
12
by: Studiotyphoon | last post by:
Hi, I have report which I need to print 3 times, but would like to have the following headings Customer Copy - Print 1 Accounts Copy - Print 2 File Copy -Print 3 I created a macro to...
14
ollyb303
by: ollyb303 | last post by:
Hi, I am trying to create a dynamic crosstab report which will display number of calls handled (I work for a call centre) per day grouped by supervisor. I have one crosstab query (Query1) which...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.