Force GrowToHeight in PostProcessing step

Stimulsoft Ultimate discussion
Post Reply
User avatar
tpontow
Posts: 206
Joined: Thu Sep 06, 2012 8:46 am
Location: Bonn, Germany

Force GrowToHeight in PostProcessing step

Post 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
Attachments
Clipped text after increasing font size in psot processing
Clipped text after increasing font size in psot processing
ClippedTextAfterIncreasingFontSize.png (36.7 KiB) Viewed 4087 times
Thorsten Pontow

It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
User avatar
tpontow
Posts: 206
Joined: Thu Sep 06, 2012 8:46 am
Location: Bonn, Germany

Re: Force GrowToHeight in PostProcessing step

Post 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.
Attachments
StimulsoftPostprocessingTest.zip
Sample project with postprocessing
(17.24 KiB) Downloaded 207 times
Thorsten Pontow

It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Force GrowToHeight in PostProcessing step

Post 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.
User avatar
tpontow
Posts: 206
Joined: Thu Sep 06, 2012 8:46 am
Location: Bonn, Germany

Re: Force GrowToHeight in PostProcessing step

Post 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
Thorsten Pontow

It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Force GrowToHeight in PostProcessing step

Post by HighAley »

Hello.

Please, describe more detailed how and when do you use the Tag property.

Thank you.
User avatar
tpontow
Posts: 206
Joined: Thu Sep 06, 2012 8:46 am
Location: Bonn, Germany

Re: Force GrowToHeight in PostProcessing step

Post by tpontow »

See the following forum threads to learn more about my way of using the Tag property.

http://forum.stimulsoft.com/viewtopic.php?f=9&t=37032

http://forum.stimulsoft.com/viewtopic.php?f=12&t=34367
Thorsten Pontow

It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Force GrowToHeight in PostProcessing step

Post 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.
User avatar
tpontow
Posts: 206
Joined: Thu Sep 06, 2012 8:46 am
Location: Bonn, Germany

Re: Force GrowToHeight in PostProcessing step

Post 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
Thorsten Pontow

It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Force GrowToHeight in PostProcessing step

Post by HighAley »

Hello.

We are always glad to help you.
Let us know if you need any additional help.

Thank you.
Post Reply