473,386 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Report Page Numbering problem

19
I have a report that displays the page numbering incorrectly. Example page 1 of 3 but only 2 pages are displayed when previewing or printing the report. Here is the details:

Page footer - text box with control source as:
="Page" & [Page] & " of " & [Pages]
There is a group header with the following code in the OnFormat property: linecnt = 0
Group Footer OnFormat property:
Expand|Select|Wrap|Line Numbers
  1.     If linecnt = 1 Then
  2.         DoCmd.CancelEvent
  3.     End If
Not sure if this code helps. Any thoughts would be helpful on why the page counter says 3 pages instead of 2?
Thanks!
Apr 8 '09 #1
7 2748
ADezii
8,834 Expert 8TB
@Reedsp
  1. What exactly is linecnt, and how is it incremented?
  2. As a Temporary Band Aid, can you use:
    Expand|Select|Wrap|Line Numbers
    1.  ="Page" & [Page] & " of " & [Pages] - 1
  3. Have you tried setting Cancel = True in the Group Footer's Format() Event as oppossed to DoCmd.CancelEvent, namely?
    Expand|Select|Wrap|Line Numbers
    1. If linecnt = 1 Then
    2.   Cancel = True
    3. End If
  4. What exactly are you trying to Cancel?
Apr 8 '09 #2
Reedsp
19
Thanks for the suggestions. I tried both. The -1 suggestion worked for reports with 3 pages and only showing 2 but not when there is 174 page report. The Cancel Event didn't do anything different.

I will try and explain what is happening, I didn't program the report, I inherited the Database and so I'm trying to solve the problems.
In the Group Header 0 Format property the code reads: linecnt = 0
In the Detail Print Format property the code reads: linecnt=linecnt+1
In the Group Footer0 Format property the code reads: If linecnt=1 then
docmd.Cancelevent
End if
Description of what it is doing as best as I can: As each new group is printed the linecnt is set to zero, so that in the footer the text boxes show( these are total boxes summing values from the detail line. The report only wants to print or show the "Total" boxes when there is a new group. When access goes to preview or print the report the page counter is correct for the number of pages but because of the format property not to show the footer after every detail line only at group breaks the report appears or shows less pages. Hope this makes sence. I think the Detail Print linecnt=linecnt+1 line helps to the system not to print the group footer info by incrementing the counter until a new group appears.

Not sure where to go from here because the page counter function is correct in the number of pages but the view is limited by the group footer format code. Any suggestions or thoughts on how to not show information in the footer but have the pages function reflect what actually is in preview.

Thanks.
Apr 9 '09 #3
ADezii
8,834 Expert 8TB
@Reedsp
Can you send me a Copy of the Database if I give you my E-Mail Address in a Private Message?
Apr 9 '09 #4
Reedsp
19
I wish I could but its 55 MB and contains financial information. The only alternative is to copy the report to a database of its own. You can't run the report but you could look at the structure and code. If this would help let me know.
Apr 9 '09 #5
ADezii
8,834 Expert 8TB
@Reedsp
I looked over the Report for a brief period of time, but without some visual indication of what is happening (via valid Report data), I'm afraid that an accurate Reply isn't forthcoming. Duplicating the functionality would be much too time consuming. You also have 2 Groupings based on the same Field but with Headers/Footers flipped, and different Group Intervals. This may be a source for confusion. Can you provide me with some valid data, so that I may see exactly what is/is not happening in the Report?
Apr 14 '09 #6
Reedsp
19
I will see what I can do to get some data. It may take me a few days.
Apr 15 '09 #7
ADezii
8,834 Expert 8TB
@Reedsp
No rush, Reedsp, I'll be away from April 20 to April 22 anyway.
Apr 15 '09 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Wayne Aprato | last post by:
I have a report that shows the results of a query. One of the fields is an autonumber field from the query which shows for instance: 120, 121 , 122 for 3 records. Is there a way to have another...
2
by: Wayne Aprato | last post by:
I posted this yesterday and it seems like a moderator has thrown it in another thread. This is a totally different question to the one asked in that thread, so I'm posting it again. It is not a...
3
by: Paradigm | last post by:
I have a contract document that is about 20 pages long with various data base fields in it. I cannot create an Access report that long so I have had to do it as 5 seperate reports. There are some...
2
by: Elasho | last post by:
I have a report that groups data on an Area, the report is set to force a new page for each Area within the report. Each Area will have 1 or more pages. Is it possible to make the page...
5
by: bcanavan | last post by:
When I export xml(and xls) from Access 2003 the result is a complete report in a single page. I would like to get the entire report in a single page (one trip to the server) for printing and...
1
by: Simon | last post by:
Dear reader, Most of the reports have a page numbering as Page x of nn, starting at the first page 1 (one) to the last page nn. But know I need to start with Page 1 of nn for each...
1
by: Stinky Pete | last post by:
Evening, I have a form that uses 5 pages (it's an electronic copy of the paper version) we are going to use for manufacturing non conformances and product deviations. In case your wondering,...
4
by: Jana | last post by:
Hi! I have an Access 97 report based on tables linked to an SQL back end. The report has 5 subreports in it (unfortunately unavoidable due to the nature of the report) and performance is quite...
8
MMcCarthy
by: MMcCarthy | last post by:
Interesting title isn't it. Ok everyone, I have a problem and I'm hoping some of you genius's have a solution. I have a Report which after being printed will have the pages run through an...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.