|
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();
|