ok, settled

VB Code:
  1. Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
  2.     counterReport = counterReport + 1
  3.     txtId = counterReport
  4. End Sub
  5.  
  6. Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
  7.     counterReport = 0
  8. End Sub

the counterReport is a variable in module