下面是我程序的Detail的Format事件的代码
Private Sub Detail_Format(sender As Object, e As EventArgs) Handles Detail.Format
On Error GoTo ErrorHandler
If m_lngCnt > UBound(G_FjAddrPrt) Then
Exit Sub
End If
With G_FjAddrPrt(m_lngCnt)
'----------------------------------------
' 明細データセット
'----------------------------------------
If m_intDetailCnt = CM_MaxDataCnt + 1 Then '明細MAX + 1で改ページ
Fields("DTCNT").Value = Fields("DTCNT").Value + 1
Detail.NewPage = SectionReportModel.NewPage.Before
m_intDetailCnt = 0
Else
Detail.NewPage = SectionReportModel.NewPage.None
End If
'----------------------------------------------------------
m_intDetailCnt = m_intDetailCnt + 1 '行件数
'----------------------------------------------------------
m_lngCnt = m_lngCnt + 1 'レコード件数
End With
Exit Sub
ErrorHandler:
'エラーログ出力
Call gsPutLog(Err.Number & ":" & Err.Description)
End Sub |