Page 1 of 1
Force GrowToHeight in PostProcessing step
Posted: Tue Nov 25, 2014 8:35 am
by tpontow
Hello,
i perform a postprocessing step for my reports when EndRender-Event is fired. I loop over all rendered pages of the report and do some changes to Text-Components (i.e instances of StiText class). I change for example color, style (bold / italic) and size of font. Everything works as expected, but i have one problem.
The properties CanGrow, GrowToHeight and WordWrap of StiText instance i set to true.
Code: Select all
GrowToHeight = true,
WordWrap = true,
CanGrow = true
When i have text with line break and text fits perfect with default font
Arial 8pt, after changing font size in post processing to
9pt the content is clipped. This is so because the text component does not GrowToHeight again after font size is inreased.
Is it somehow possible to force the GrowtoHeight action again in post rendering?
Thanks and kind regards
Thorsten Pontow
Re: Force GrowToHeight in PostProcessing step
Posted: Tue Nov 25, 2014 1:44 pm
by tpontow
I attached a sample project including designed report. Postprocessing step changes font color to red and increases font size from 8 to 10.
Re: Force GrowToHeight in PostProcessing step
Posted: Wed Nov 26, 2014 10:30 am
by HighAley
Hello.
We do you change font size in the End Render event.
You can do it before rendering or using Conditions.
When you call the End Render event the report is rendered and if you need to see any changes you should render it again.
Thank you.
Re: Force GrowToHeight in PostProcessing step
Posted: Wed Nov 26, 2014 11:28 am
by tpontow
Hi Aleksey,
it's a dynamic process and i do know the final font size only at runtime. I put my own styling information into the Tag-field of components so each single cell can have it's own appearance.
How can i render the report again? In this case the EndRender event fires again and i have infinite loop
Thanks
Thorsten Pontow
Re: Force GrowToHeight in PostProcessing step
Posted: Wed Nov 26, 2014 11:43 am
by HighAley
Hello.
Please, describe more detailed how and when do you use the Tag property.
Thank you.
Re: Force GrowToHeight in PostProcessing step
Posted: Wed Nov 26, 2014 12:20 pm
by tpontow
Re: Force GrowToHeight in PostProcessing step
Posted: Thu Nov 27, 2014 12:28 pm
by HighAley
Hello, Thorsten.
Sorry, but we still don't know your scenario. You asked about the problems of implementation but didn't describe the scenario how do you use our product.
Could you write us about this and we will try to find the way out?
Thank you.
Re: Force GrowToHeight in PostProcessing step
Posted: Tue Dec 02, 2014 3:03 pm
by tpontow
Hi Aleksey,
I solved the problem by doing my post-processing step not on EndRender but on the GetTag event. At that time in the compiled report i have all information i need for changing the appearance of the components. The rendering step then uses my updated components and the layout is correct. It works great.
Thanks for your support
Thorsten Pontow
Re: Force GrowToHeight in PostProcessing step
Posted: Wed Dec 03, 2014 10:02 am
by HighAley
Hello.
We are always glad to help you.
Let us know if you need any additional help.
Thank you.