N
niuginikiwi
I have a report that I am forcing the labels, frames, textboxes etc to be
printed on at the bottom of the last page of the report.
The code below does just that (ie all objects have their visibility turned
to false to start by default but turned to true if the current page equals
the total number of pages in the report) and all looks fine when I preview
the report but when I print the report, it somehow prints the page footer
contents on every page.
Does anyone one know how I could get it to print only on the last page?
Here is the code on the OnFormat property of the Page Footer.
Private Sub PageFooterSection_Print(Cancel As Integer, PrintCount As Integer)
If [Page] = [Pages] Then
'[PageFooterControlName1] = [ReportFooterControlName1]
Me.txtAmountOwing.Visible = True
Me.txtAmountPaid.Visible = True
Me.txtBankDetails.Visible = True
Me.txtCharges.Visible = True
Me.txtCratesPallets.Visible = True
Me.txtDeliveryTotal.Visible = True
Me.txtGrandTotal.Visible = True
Me.txtGrowerName.Visible = True
Me.txtInvoiceDate.Visible = True
Me.txtSubtotal.Visible = True
Me.txtCratesTotal.Visible = True
Me.txtPalletsTotal.Visible = True
'[txtDiscountTotal] = [txtDiscount]
Me.txtDiscountTotal.Visible = True
Me.lneAmountPaid.Visible = True
Me.lneDashedLine.Visible = True
Me.lneTotalBottom.Visible = True
Me.lneTotalTop.Visible = True
Me.lneTop.Visible = True
Me.lblPleaseDetach.Visible = True
Me.lblReturnAddress.Visible = True
Me.lblPleasePay.Visible = True
Me.fraCreatesAndPallets.Visible = True
Me.fraTotals.Visible = True
Me.gst.Visible = True
End If
End Sub
printed on at the bottom of the last page of the report.
The code below does just that (ie all objects have their visibility turned
to false to start by default but turned to true if the current page equals
the total number of pages in the report) and all looks fine when I preview
the report but when I print the report, it somehow prints the page footer
contents on every page.
Does anyone one know how I could get it to print only on the last page?
Here is the code on the OnFormat property of the Page Footer.
Private Sub PageFooterSection_Print(Cancel As Integer, PrintCount As Integer)
If [Page] = [Pages] Then
'[PageFooterControlName1] = [ReportFooterControlName1]
Me.txtAmountOwing.Visible = True
Me.txtAmountPaid.Visible = True
Me.txtBankDetails.Visible = True
Me.txtCharges.Visible = True
Me.txtCratesPallets.Visible = True
Me.txtDeliveryTotal.Visible = True
Me.txtGrandTotal.Visible = True
Me.txtGrowerName.Visible = True
Me.txtInvoiceDate.Visible = True
Me.txtSubtotal.Visible = True
Me.txtCratesTotal.Visible = True
Me.txtPalletsTotal.Visible = True
'[txtDiscountTotal] = [txtDiscount]
Me.txtDiscountTotal.Visible = True
Me.lneAmountPaid.Visible = True
Me.lneDashedLine.Visible = True
Me.lneTotalBottom.Visible = True
Me.lneTotalTop.Visible = True
Me.lneTop.Visible = True
Me.lblPleaseDetach.Visible = True
Me.lblReturnAddress.Visible = True
Me.lblPleasePay.Visible = True
Me.fraCreatesAndPallets.Visible = True
Me.fraTotals.Visible = True
Me.gst.Visible = True
End If
End Sub