我正在尝试简单地更改水晶报表项目上文本对象的文本。到处都看,但似乎无法找到一个好的工作解决方案。我的代码如下,它正确加载报告,并没有显示任何错误,但文本不会更改。任何想法为什么没有改变?
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
Dim report As New ReportDocument
report.Load("myreportlocation")
Dim txt As CrystalDecisions.CrystalReports.Engine.TextObject = DirectCast(report.ReportDefinition.Sections("Section1").ReportObjects("Text29"), CrystalDecisions.CrystalReports.Engine.TextObject)
txt.Text = "Test"
End Sub
人