how to access textObject in crystalreport

  • Thread starter Wilfried Mestdagh
  • 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 ?
 
W

Wilfried Mestdagh

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";
 
W

Wilfried Mestdagh

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";
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top