Dwallace
26th February 2002, 23:07
I need to keep lines together at a report breakpoint. I can use the 'need' field, and fill it in with say "10". Most of my layout lines aren't more than 10, but some are.
This also leaves me with some unsightly blank lines at the bottom of my pages (customers hate these!).
Thoughts? and Thanks!
Denise
evesely
27th February 2002, 14:46
Are you trying to keep things together that are in multiple layouts? You can always use need(x) in the report script if you know how many lines are needed. I guess I would need more detailed information to give any clearer suggestions.
Dwallace
27th February 2002, 16:25
I'm already using need(10) - and this catches most of the lines.
I thought perhaps there was another obscure command that would keep ALL lines of a layout on the same page, regardless of how many lines.
evesely
28th February 2002, 15:23
I'm going to assume that there is a text field in the layout. Otherwise, I think the size of the layout would be known. So...
You could try two layouts. The first you would use to determine the size of the text field without actually printing it. The second layout would actually print the text while doing the correct "need".
For example:
detail.1:
before.layout:
num.text.lines = 0
print.text = false
detail.2:
before.layout:
need(num.text.lines)
print.text = true
field.text.field:
before.print:
if not print.text then
num.text.lines = num.text.lines + 1
lattr.print = false
endif
I haven't tried this and it may not be the most elegant solution, but I think it should work. You probably will get a blank line for detail.1. I thought about using lattr.print = false there, but that may invalidate the rest of the script. Any way, it might be enough to get you started.:p