I just tried it with a textbox:
Code: Select all
StiReport rep = new StiReport();
rep.Load("test.mrt");
DataSet ds = new DataSet();
(...) // fill Dataset
rep.RegData(ds);
rep.Compile();
foreach (object comp in rep.CompiledReport.GetComponents())
{
if (comp.GetType() == typeof(StiText))
{
StiText tmp = new StiText();
tmp = (StiText)comp;
if (tmp.Name == "TestTextbox")
{
tmp.Text = tmp.Text += " (Test)";
}
}
}
rep.Render();
rep.ExportDocument(StiExportFormat.Pdf, @"c:\test.pdf");
I wrote a text into the TestTextbox at designtime, but at runtime tmp.Text is empty.
My code appends the string to it (so it contains " (Test)" then), but on the exported report there is only the text that I set at design time.
I'm completely new at Stimulsoft Reports - can someone explain to me how to do it right?
We are very likely to buy Stimulsoft Reports, as soon we made sure that it can do everything that we need.
Manipulating images and text at runtime is the last thing that's missing.
Thank you!