Reading content of StiText after finished rendering

Stimulsoft Reports.WPF discussion
Post Reply
Prandl33
Posts: 40
Joined: Wed Nov 16, 2016 4:24 pm

Reading content of StiText after finished rendering

Post by Prandl33 »

Hello,
I want to read the content of a StiText component from the rendered report.
Here are my codesnippets of my experiments.

Report.RenderWithWpf(false);

foreach (StiPage page in Report.RenderedPages.Items) {
StiText metaText05 = (StiText) page.GetComponents()["Text05"];
StiText metaText06 = (StiText) page.GetComponents()["Text06"];
}

The metaText05.Text.Value and metaText06.Text.Value always are empty.
How do I have to write it so it works properly.

Thank you
Prandl
Last edited by Prandl33 on Thu Nov 17, 2016 6:13 am, edited 1 time in total.
Prandl33
Posts: 40
Joined: Wed Nov 16, 2016 4:24 pm

Re: Reading content of StiText after finished rendering

Post by Prandl33 »

Hello,
I have the solution:

string text = (page.Report.GetComponents()["Text05"] as StiText).Text.Value

Thank you
Prandl
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Re: Reading content of StiText after finished rendering

Post by Andrew »

Dear Prandl,

Thank you for sharing your solution and letting us know about this.

Thank you.
Post Reply