标题:[求助]DataReport中怎么老提示找不到Text
只看楼主
画梦
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2006-3-25
 问题点数:0 回复次数:0 
[求助]DataReport中怎么老提示找不到Text

我用VB报表生成器遍了一个打印程序,怎么老提示找不到Text,请高手指点一下,原代码如下:


Private Sub DataReport_Initialize()

Dim cnn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim str As String
Dim strsql As String

str = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & App.Path & "\databases\try.mdb;" & _
"Mode=Read|Write|Share Deny None;" & _
"Persist Security Info=False"

cnn.Open str
rs.CursorLocation = adUseClient
strsql = "select * from 管串数据报表"
rs.Open strsql, cnn, adOpenDynamic, adLockOptimistic

Set DataReport1.DataSource = rs

DataReport1.Sections(1).Controls("Text1").DataField = rs.Fields(1)
DataReport1.Sections(1).Controls("Text2").DataField = rs.Fields(2)
DataReport1.Sections(1).Controls("Text3").DataField = rs.Fields(3)

End sub

搜索更多相关主题的帖子: 提示 Text DataReport 
2006-03-26 12:04



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-52885-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.030287 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved