Four Js Development Tools Forum

Discussions by product => Reporting tools (GRW, GRE) => Topic started by: Paul M. on October 20, 2017, 01:32:20 pm



Title: Keeping heading & data on same page
Post by: Paul M. on October 20, 2017, 01:32:20 pm
Hi,

Is there any way to say in the report writer if there isn’t enough room left on the page for my header and one or two lines of data then start the header the next page.

I have a report and I print headings after a change in transaction no. The header box sometimes starts at the bottom on one page and the data on the next so I just want to keep them together (see attached heading1).

Any suggestions?

Thanks.


Title: Re: Keeping heading & data on same page
Post by: Alex G. on October 23, 2017, 10:29:23 am
Hi Paul,

a way to avoid orphaned headers is to ensure that the parent box is big enough to contain the header and at least one row.
You can achieve this by setting the properties y-size to the expression "rest>3*length("M")?rest:max" and Y-Size-Adjustment="shrinkToChildren".
The "3*length("M")" expression makes sure that the space left in the parent ("rest") is high enough for three lines using the current font.

Kind regards,

Alex


Title: Re: Keeping heading & data on same page
Post by: Paul M. on October 25, 2017, 08:20:32 am
Alex,

Thank you. That is exactly what I wanted to know how to do and I now have no more orphaned headings.
Regards,

Paul.


Title: Re: Keeping heading & data on same page
Post by: Alex G. on October 25, 2017, 11:19:13 am
Thanks for getting back. Glad that I could help.
Regards,

Alex