过去VB的报表一览数据是这样处理的,
Private Sub ActiveReport_DataInitialize()
Fields.Add "cd"
Fields.Add "name"
...
Exit Sub
End Sub
Private Sub ActiveReport_FetchData(EOF As Boolean)
If flngLpCnt < flngLpEnd Then
flngLpCnt = flngLpCnt + 1
EOF = False
Else
EOF = True
Exit Sub
End If
With frm99500.spsList
.Row = flngLpCnt
.Col = SP_COL_CD
Fields("cd").Value = .Text
.Col = SP_COL_NAME
Fields("name").Value = .Text
End With
Exit Sub
End Sub
VB。net中相应事件(ActiveReport_FetchData,ActiveReport_DataInitialize)都已经找到,但是Fields定义老出错。不知道怎么定义。想和过去vb方法尽量保持一致,可以吗?(调查发现用DataTable可以实现,但还是想用Fields的这种形式,因为data已经取出来,放spreadList里了) |
|