Joined: 15 Nov 2006
Location: Portugal
Online Status: Offline
Posts: 6
Topic: Get a TextObject Value Posted: 18 Dec 2009 at 8:23am
Hi!
I need to get the values of two TextObjects that are in my RPT ReportHeader. I can do this in my code correctly.
Problem is i have DB fields in this text objects which i need to see, something like:
TextObject1.Text = "Something {notetable.name}"
is there anyway i can get the {notetable.name} real DB value, like i was printing or something?
Using reportDocument.ExportToStream works correctly but i can't get specific textobject text.
The DataSource of my rpt is a DataSet.
my code:
ReportDocument report = new ReportDocument();
report.Load(fileName);
report.SetDataSource(outputDataSet);
if (report.ReportDefinition.Sections[0].ReportObjects.Count >= 1)
{
TextObject textObject = report.ReportDefinition.Sections[0].ReportObjects[0] as TextObject;
if (textObject != null)
text = textObject.Text;
}
report.Close();
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