how to access textObject in crystalreport

  • Thread starter Thread starter Wilfried Mestdagh
  • Start date Start date
W

Wilfried Mestdagh

Hi,

I'm trying to find my way in my first crystalreport. To make a summary I
need of course put text and results on it. There is a TextObject, but
how do I reach it from code ?
 
I found how to access it. But I dont have a Text property, can someone
help ?

also the way to access is seems difficult. Is there a better one ?

// Seems I can access is as this:
Console.WriteLine(CrystalReport61.ReportDefinition.Sections["Section5"].ReportObjects["Text5"].ToString());
// Seems to be a: CrystalDecisions.CrystalReports.Engine.TextObject
//(CrystalDecisions.CrystalReports.Engine.TextObject)(CrystalReport61.ReportDefinition.Sections["Section5"].ReportObjects["Text5"]).Text
= "hello";
 
Hello,

I think I found it :)
It is hard way to find this :)

using CrystalDecisions.CrystalReports.Engine;

TextObject text5;
text5 =
(TextObject)CrystalReport61.ReportDefinition.Sections["Section5"].ReportObjects["Text5"];
text5.Text = "It works";
 
Back
Top