Here is the c# version: -
To change the value of ITextObject of Crystal Report (Visual Studio 2008) at run time you have to: -
- Create a object of ITextObject
- Assign the source object with typecast to new object
- Now use the new object and set all the properties (like Text, Font etc…)
CrystalDecisions.CrystalReports.Engine.TextObject txtReportHeader;
txtReportHeader = MyReport.ReportDefinition.ReportObjects["txtHeader"] as TextObject;
txtReportHeader.Text = "All Vouchers Print - Prabhat";
http://prabhat.me/2009/11/06/change-the-value-of-itextobject-of-crystal-report-at-runtime/