Hello Stimulsoft,
is it somehow possible to perform a post processing step after a report is rendered? For example i like to set some text fields of the output of a rendered DataBand (let's say first column in second row ) to bold. In the definition of the DataBand the StiText objects are set to non bold.
In general, is it somehow possible to manipulate the attributes of text components after rendering?
Thanks and kind regards
Thorsten Pontow
Report post processing
Report post processing
Thorsten Pontow
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
Re: Report post processing
I found a way and i hope that is the correct way to to that.
I registered the CompiledReport.EndRender event. In the event handler method i loop over all Components of the RenderedPages. They are all StiText components which i can manipulate the way i like to (for example set TextBrush to red
).
Is it ok to do it that way?
Kind regards
Thorsten Pontow
I registered the CompiledReport.EndRender event. In the event handler method i loop over all Components of the RenderedPages. They are all StiText components which i can manipulate the way i like to (for example set TextBrush to red

Code: Select all
CompiledReport.EndRender += ListReportEndRender;
Code: Select all
void ListReportEndRender(object sender, EventArgs e)
{
DoPostProcessing();
}
private void DoPostProcessing()
{
StiComponentsCollection componentsCollection = RenderedPages[0].GetComponents();
foreach (var component in componentsCollection)
{
StiText text = component as StiText;
if (!ReferenceEquals(text, null))
{
text.TextBrush = new StiSolidBrush(Color.Red);
}
}
}
Kind regards
Thorsten Pontow
Thorsten Pontow
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
Re: Report post processing
Hello.
Yes, you could do so if you need.
Thank you.
Yes, you could do so if you need.
Thank you.