473,327 Members | 1,976 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,327 software developers and data experts.

Going Insane ! Forcing page breaks on Invoice report

2
I have an invoice report in Access. I have three invoices. I want to force a page break after each invoice# so I end up with three invoices, each with a header (invoice# date etc.), detail (items purchased, cost, extension etc) and a footer (totals, amount due etc.). I can't for the life of me do this after spending a morning trying to use the force page break proprty setting.

My invoice design has a report header (invoice# etc.), page header (where the column names are specified), detail (items, costs), page footer (empty) and a report footer (totals).

Can someone help me before I go insane?!!!
Apr 20 '07 #1
4 4734
Corster
36
In your group properties, (Right-click your group header section) change "Keep Together" to "Whole Group". This means if a group begins after the first line on a page, it will start on the next page..
Change the "Force New Page property of your group to "Before Section". This will ensure that no two groups are on the same page.
Apr 20 '07 #2
MMcCarthy
14,534 Expert Mod 8TB
In your group properties, (Right-click your group header section) change "Keep Together" to "Whole Group". This means if a group begins after the first line on a page, it will start on the next page..
Change the "Force New Page property of your group to "Before Section". This will ensure that no two groups are on the same page.
Alternatively set the Force New Page to "After Section" and put it on the Footer.
Apr 21 '07 #3
I hope this helps others with similar problems.
I spent days trying to work out how to trigger page breaks in the Report Footer section of a report. My Report Footer needed to contain a number of sections which all needed to start on a new page if present. After much Google research I eventually worked out a solution. As follows.
In report design view I included all the page breaks I needed in the Report Footer section of my report. Each (named) page break was at the end of each (named) section (fields or subforms). In the ON FORMAT event for the Report Footer I included the following code which conditionally turned on (made visible) the page breaks. The code is below which can be simplified or expanded dependant on how many conditional page breaks are required.
Expand|Select|Wrap|Line Numbers
  1. Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
  2. On Error GoTo Err_ReportFooter_Format
  3.  
  4. 'Conditionally show report footer page breaks
  5.  
  6. 'Set all page breaks in Report Footer section to be NOT visible
  7.   Me.PageBreakDisclaimer.Visible = False 'Disclaimer section
  8.   Me.PageBreakCheckInStatement.Visible = False 'Check In Statement section
  9.   Me.PageBreakCheckOutStatement.Visible = False 'Check Out Statement Section
  10.   Me.PageBreakCheckInComment1.Visible = False 'Check In Comment1 section
  11.   Me.PageBreakCheckInComment2.Visible = False 'Check In Comment2 section
  12.   Me.PageBreakCheckOutComment1.Visible = False 'Check Out Comment1 section
  13.   Me.PageBreakCheckOutComment2.Visible = False 'Check Out Comment2 section
  14.  
  15. 'Set Disclaimer Page Break condition
  16.     If Len(Nz([txtFormal] & [txtFormal] & [txtDisclaimerHeading] & [txtDisclaimer] & _
  17.     [txtCopyrightHeading] & [txtCopyright] & [txtAuthorisedUsageHeading] & _
  18.     [txtAuthorisedUsage] & [txtContactHeading] & [txtContact], "")) = 0 Then
  19.     Me.PageBreakDisclaimer.Visible = False
  20.    Else
  21.     Me.PageBreakDisclaimer.Visible = True
  22.    End If
  23.  
  24.    'Set Check In Statement Page Break condition
  25.    If Len(Nz(CheckInStatement![txtCheckInStatementHeading] & CheckInStatement![txtCheckInStatement], "")) = 0 Then
  26.     Me.PageBreakCheckInStatement.Visible = False
  27.    Else
  28.     Me.PageBreakCheckInStatement.Visible = True
  29.    End If
  30.  
  31.     'Set Check Out Statement Page Break condition
  32.    If Len(Nz(CheckOutStatement![txtCheckOutStatementHeading] & CheckOutStatement![txtCheckOutStatement], "")) = 0 Then
  33.     Me.PageBreakCheckOutStatement.Visible = False
  34.    Else
  35.     Me.PageBreakCheckOutStatement.Visible = True
  36.    End If
  37.  
  38.     'Set Check In Comment1 Page Break condition
  39.    If Len(Nz(CheckInComment1![txtCheckInCommentHeading1] & CheckInComment1![txtCheckInComment1], "")) = 0 Then
  40.     Me.PageBreakCheckInComment1.Visible = False
  41.    Else
  42.     Me.PageBreakCheckInComment1.Visible = True
  43.    End If
  44.  
  45.    'Set Check In Comment2 Page Break condition.
  46.    'Note. This uses the same criteria as Check In Comment1 above
  47.    If Len(Nz(CheckInComment1![txtCheckInCommentHeading1] & CheckInComment1![txtCheckInComment1], "")) = 0 Then
  48.     Me.PageBreakCheckInComment2.Visible = False
  49.    Else
  50.     Me.PageBreakCheckInComment2.Visible = True
  51.    End If
  52.  
  53.     'Set Check Out Comment1 Page Break condition
  54.    If Len(Nz(CheckOutComment1![txtCheckOutCommentHeading1] & CheckOutComment1![txtCheckOutComment1], "")) = 0 Then
  55.     Me.PageBreakCheckOutComment1.Visible = False
  56.    Else
  57.     Me.PageBreakCheckOutComment1.Visible = True
  58.    End If
  59.  
  60.    'Set Check Out Comment2 Page Break condition
  61.    If Len(Nz(CheckOutComment1![txtCheckOutCommentHeading1] & CheckOutComment1![txtCheckOutComment1], "")) = 0 Then
  62.     Me.PageBreakCheckOutComment2.Visible = False
  63.    Else
  64.     Me.PageBreakCheckOutComment2.Visible = True
  65.    End If
  66.  
  67. Exit_ReportFooter_Format:
  68.     Exit Sub
  69.  
  70. Err_ReportFooter_Format:
  71.     MsgBox Err.Description
  72.     Resume Exit_ReportFooter_Format
  73.  
  74. End Sub
Mar 10 '12 #4
NeoPa
32,556 Expert Mod 16PB
I can't see why a kludgy block of code is required when a far simpler, and much more straightforward, approach is available in post #3.
Mar 10 '12 #5

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

Similar topics

2
by: Chris | last post by:
Dear all, Its IE again which is doing funny things to my page at http://www.bangor.ac.uk/webteam/uwb_template/blue/website/template.php Works as expected in Moz browsers - but IE makes the...
1
by: amazo | last post by:
Dear all, I am stuck in the following problem: .. I have an A4 paper size in landscape mode to print 2 invoices, one on the left middle and next on the right middle. .. Designing the report...
1
by: touf | last post by:
Hi, I like to prit an invoice that has theses sections in the first page 1- invoice num 2- invoice header: date, customer,..... 3- titles line 4- detail in the other pages I displaye the...
4
by: Dan | last post by:
Hi, I have an asp.net page i have made that creates an invoice based on the invoice id given. It works fine but the problem i have is i now want to loop through my database and grab all the...
1
by: kaosyeti | last post by:
hey... i have a report that groups on salespeople. the report footer is a three part summary of the store's total data with 2 different departments for parts 1 and 2 and a store total for part 3. ...
3
by: jamesnkk | last post by:
I follow the invoice format from Nwind database. In my Page Header I have company name, address along with Invoice No...etc In my GroupHeader2 which contain Billing Address, Shipping Address...
1
by: =?Utf-8?B?UHJhc2FkIFBhdGls?= | last post by:
Hi, I have developed a report with Page Breaks based on Group in SQL Server Reporting Services 2000. This report works fine in SQL Reporting Services showing Page Breaks for different groups. ...
6
by: ConfusedMay | last post by:
Hi I need some helps in calculating the invoice amount in access 2003 report. Basically I have an access report that shows invoice#, invoice amount, payment amount, and payment date. The problem is...
1
by: franc sutherland | last post by:
Hi, I am using Access 2003. I have set up an invoice in a report. I have set up the name and address as text boxes in the Page Header which I've made as small as possible then set the Can...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.