Topic: amend subreport at runtime Posted: 04 Sep 2012 at 5:06pm
Hi guys
I'm trying to implement the following code from the crystal report book:
Dim myReport As New CrystalReport1 Dim mySubReport As CystalDecisions.CrystalReports.Engine.ReportDocument Dim myReportObject As CrystalDecisions.CrystalReports.Engine.ReportObject Dim myTextObject As CrystalDecisions.CrystalReports.Engine.TextObject mySubReport = myReport.OpenSubreport("Sales Subreport") myReportObject = MySubReport.ReportDefinition.ReportObjects.Item("Text3") myTextObject = CType(myReportObject, CrystalDecisions.CrystalReports.Engine.TextObject) myTextObject.ObjectFormat.EnableSuppress = True CrystalReportViewer1.ReportSource = myReport
However, I get the following error message:
"Object reference not set to an instance of an object"
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Posted: 06 Sep 2012 at 3:42am
There's documentation for setting parameters here: http://bit.ly/OZsPa0This is in the XI r2 documentation, which is better than the docs for the newer versions and still works.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum