جمع صفحه در گزارش
دوستان سلام
نمونه حاضر در پاسخ به سئوال چند تن از كاربران آماده شده با اين توضيح كه دو تا تكست باكس unbound يكي در page Header با نام nagl و ديگري در Page Footer با نام page total ، اولي براي نشان دادن نقل از صفحه قبل و دومي براي جمع صفحه در نظر گرفته شده.
كدهاي به كار رفته :
Option Compare Database
Option Explicit
Dim curtotal As Currency
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If PrintCount = 1 Then curtotal = curtotal + Me.mablagdarkhasti
End Sub
Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer)
Me.pagetotal = curtotal
End Sub
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
Me.nagl = curtotal
curtotal = 0
End Sub
..........................
موفق باشيد