急! 在VB中怎样为水晶报表9.2赋值!
我在报表Report1.rpt的报表页眉Sections(1)中插入文本对象text14,想在报表时text14显示"维修报表"
用下面语句报错“错误的参数号或无效的属性赋值”
如何给文本对象赋值。
Dim oApp As New CRAXDRT.Application
Dim oRpt As CRAXDRT.Report
Dim reportName As String
If RSA.State = adStateOpen Then RSA.Close
RSA.Open "SELECT * From Repair , dba, adOpenStatic, adLockOptimistic
If RSA.EOF = False And RSA.BOF = False Then
reportName = "\Report1.rpt" '定义要引用的rpt文件
Set oRpt = oApp.OpenReport(App.Path & reportName, 1)
oRpt.Database.SetDataSource RSA, 3, 1 '连接水晶报表和数据源
oRpt.Sections(1).ReportObjects(4).Text = "维修报表"
Viewer91.ReportSource = oRpt '启用水晶报表的预览功能
CRViewer91.ViewReport
End If