阿泰的软件实用主义

水晶报表/BOE 第4季 [8月—9月]

博客园 首页 新随笔 联系 订阅 管理
  146 Posts :: 9 Stories :: 1763 Comments :: 17 Trackbacks

水晶报表9.2 + VB6.0,以Text控件为例

 1 Dim objCRApp As New CRAXDRT.Application    '水晶报表应用程序对象
 2 Dim objCRReport As New CRAXDRT.Report      '报表对象
 3 Dim oSection As CRAXDRT.Section  '报表节对象
 4 Dim myTextObject As TextObject
 5 '省略若干代码,打开rpt文件等 ...
 6 '循环获得报表对象的Section
 7 For Each oSection In objCRReport.Sections
 8       '打出来看一下都是些啥名
 9       Debug.Print oSection.Name
10       '找到Text控件所在的Section
11       If LCase(oSection.Name) = LCase("PageHeaderSection1"Then
12           '转换为TextObject,注意text2是我的实例中一个Text控件的名称
13           Set myTextObject = oSection.ReportObjects.Item("text2")
14           '赋值
15           myTextObject.SetText "xxxxxxxxxxxxxxxxxxxxxxx"
16     End If
17 Next
posted on 2007-12-26 22:10 阿泰 阅读(473) 评论(0)  编辑 收藏 所属分类: CR我的原创

标题  
姓名  
主页
Email (只有博主才能看到) 
验证码 *  看不清,换一张 [登录][注册]
内容(请不要发表任何与政治相关的内容)  
  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      
该文被作者在 2007-12-26 22:15 编辑过


相关链接: