Symptom
- Depending on condition the requirement may exist to modify the contents of a pre-existing text object
Resolution
- The following code will modify the text1 text object
CrystalReport1 myReport = new CrystalReport1();
CrystalDecisions.CrystalReports.Engine.TextObject Text1 = ((CrystalDecisions.CrystalReports.Engine.TextObject)myReport.Section1.ReportObjects["Text1"]);
Text1.Text = "This is what I want it to Say Now";
crystalReportViewer1.ReportSource = myReport;
See Also
- To add a text object to a report at runtime see KB 1306531 - How to add a text object to a report using the Crystal Reports .NET inproc RAS SDK
- Note that adding an object to a report at runtime requires the RAS Report Creation APIs
- All "full" versions of Crystal Reports as well Crystal Reports for Visual Studio 2010 include InProc RAS SDK
- For more information regarding the InProc RAS SKD see you Developer Help files
- Also, see RAS SDK samples:
https://wiki.sdn.sap.com/wiki/display/BOBJ/NET+RAS+SDK+Samples
Keywords
KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , How To
Product
Crystal Reports 2008 V1 ; SAP Crystal Reports XI ; SAP Crystal Reports XI R2 ; SAP Crystal Reports, developer version for Microsoft Visual Studio