473,386 Members | 1,694 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.

make visible based on pages in Group in Report

MMcCarthy
14,534 Expert Mod 8TB
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 automated process. The process needs to know when each group has finished. This will be done using visual aid of 3 lines. The first line is a marker and will aways be visible on the page. The second line will be visible on all pages in the group except the last page of the group. The third line will only be visible on the last page of the group.

Each group will start on a new page but I'm stumped on how to work out how many pages are in the group. The report page numbering will only count how many pages are in the report as a whole. I know I can print each group individually but I'm looking for a better solution.

All suggestions welcome.

Mary

P.S. Please ask any questions if this doesn't make sense. It's a difficult situation to explain.
Mar 14 '07 #1
8 2793
NeoPa
32,556 Expert Mod 16PB
Expand|Select|Wrap|Line Numbers
  1. Option Compare Database
  2. Option Explicit
  3.  
  4. Public lngPage As Long
  5.  
  6. Private Sub RouteHdr_Format(Cancel As Integer, FormatCount As Integer)
  7.     lngPage = Page - 1
  8. End Sub
Does this give you enough information?
Mar 14 '07 #2
MMcCarthy
14,534 Expert Mod 8TB
Expand|Select|Wrap|Line Numbers
  1. Option Compare Database
  2. Option Explicit
  3.  
  4. Public lngPage As Long
  5.  
  6. Private Sub RouteHdr_Format(Cancel As Integer, FormatCount As Integer)
  7.     lngPage = Page - 1
  8. End Sub
Does this give you enough information?
I kinda get where you're going but I'm not sure. Can I ring you?
Mar 14 '07 #3
Rabbit
12,516 Expert Mod 8TB
I haven't read the whole thing but it sounds close to what you want.
How to reset the page number and the total page count for each group in a Microsoft Access report.
Mar 14 '07 #4
MMcCarthy
14,534 Expert Mod 8TB
I haven't read the whole thing but it sounds close to what you want.
How to reset the page number and the total page count for each group in a Microsoft Access report.
Now I get what Ade was on about. Thanks a million Rabbit.
Mar 14 '07 #5
Rabbit
12,516 Expert Mod 8TB
Now I get what Ade was on about. Thanks a million Rabbit.
No problem.
Mar 14 '07 #6
MMcCarthy
14,534 Expert Mod 8TB
No problem.
Still I'd love to find a way to avoid creating that table.
Mar 14 '07 #7
NeoPa
32,556 Expert Mod 16PB
I kinda get where you're going but I'm not sure. Can I ring you?
Course you can.
Sorry - I was AFK watching Spurs.
Mar 14 '07 #8
MMcCarthy
14,534 Expert Mod 8TB
Course you can.
Sorry - I was AFK watching Spurs.
Thanks everyone. With Ade's help I have managed to get the lines to work in the Code footer but not the header. The header Format is processed first and therefore cannot have anything triggered by the group header and footer. Hopefully this will be an accepted solution.

For anyone who's interested, please see the template code below. linestop and lineparity are the two lines that have to be made visible or invisible.

Expand|Select|Wrap|Line Numbers
  1. Option Compare Database
  2. Option Explicit
  3.  
  4. Public lngPage As Long
  5.  
  6. Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer)
  7.  
  8.     Me.linestop.Visible = True
  9.     Me.lineparity.Visible = False
  10.  
  11. End Sub
  12.  
  13. Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
  14.  
  15.     Me.linestop.Visible = False
  16.     Me.lineparity.Visible = True
  17.     lngPage = Page - 1
  18.  
  19. End Sub
  20.  
  21. Function PageNo()
  22.     PageNo = "Page " & [Page] - [lngPage]
  23. End Function
  24.  
Mary
Mar 15 '07 #9

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

Similar topics

4
by: Chuck | last post by:
A report has many different groups of multiple pages each. Each group starts on a new page. The report is printed on both sides of the paper. I would like to be able to have each group start on...
1
by: shaqattack1992-newsgroups | last post by:
I know this is kind of a weird question, but is there anyway to give a subreport control of a main report? I posted my situation earlier about having drawings print out after a group. I have a...
0
by: galkas | last post by:
Hello I have got a report, which can run on 3 groups of data: College Faculty School Faculty contains schools. College contains faculties. The report can be run for college, then it includes...
5
by: ken | last post by:
Hi, Why can't I do this in the report activate section of my main report? I have a main report, and a subreport on it. The idea is that if the subreport has a certain value in a control within it,...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
2
by: SEFL | last post by:
Hi there, I've got a code sample below from a report from a computer database that I have built with a printer subtable, which in turn generates a printer subreport that I'm trying to put on its...
6
by: MLH | last post by:
I have a small bitmap graphic on a report. I would like to set it's Visible property to True whe the value of a certain field on the report is True. Can I do that? I have tried in the OnFormat...
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...
4
by: thecheyenne | last post by:
Hi there everybody; Fresh from reading my Access VBA for Dummies, I'd like to update my database about activities on a school outing. Here's what I'd like to achieve. The school outing costs...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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.