vb 未找到datafields('空') datareport数据报表报错
如题 代码:
Set drptwage.DataSource = rctfindsage
drptwage.Sections("Section1").Controls.Item("Text1").DataField = rctfindsage.Fields.Item(0).Name
drptwage.Sections("Section1").Controls.Item("Text2").DataField = rctfindsage.Fields.Item(1).Name
drptwage.Sections("Section1").Controls.Item("Text3").DataField = rctfindsage.Fields.Item(2).Name
drptwage.Sections("Section1").Controls.Item("Text4").DataField = rctfindsage.Fields.Item(3).Name
drptwage.Sections("Section1").Controls.Item("Text5").DataField = rctfindsage.Fields.Item(4).Name
drptwage.Sections("Section1").Controls.Item("Text6").DataField = rctfindsage.Fields.Item(5).Name
drptwage.Sections("Section1").Controls.Item("Text7").DataField = rctfindsage.Fields.Item(6).Name
drptwage.Sections("Section1").Controls.Item("Text8").DataField = rctfindsage.Fields.Item(7).Name
drptwage.Sections("Section1").Controls.Item("Text9").DataField = rctfindsage.Fields.Item(8).Name
drptwage.Sections("Section1").Controls.Item("Text10").DataField = rctfindsage.Fields.Item(9).Name
drptwage.Sections("Section1").Controls.Item("Text11").DataField = rctfindsage.Fields.Item(10).Name
drptwage.Sections("Section1").Controls.Item("Text12").DataField = rctfindsage.Fields.Item(11).Name
drptwage.Sections("Section1").Controls.Item("Text3").DataField = rctfindsage.Fields.Item(12).Name
1)用断点测试各个rctfindsage.Fields.Item(*).Name 显示字段名,
2)断点到最后一个 rctfindsage.Fields.Item(12).Name 都没有问题 当跳过这句后 就有一个 提示框vb 未找到datafields('空')
2)数据源是没有错的
---------------
请问高人如何解决,急a~~~~~~