If I use the ‘BeforePrinting’ event, is it possible to tell where on the output page a field is going to print?
I’d like to check in the ‘group’ header if there is room for at least 2 lines from the ‘body’ otherwise
force an early page break.
I have a report that seems to consistently print the Group Header at the bottom of one page,
and then the details for that group at the top of the next.
Maybe also re-print the current group header at the top of the next page.
@Emile Schwarz
Yes, I am using the built-in report generator.
Here is an example (if the link works)
The category title at the red arrow is what I would like to prevent.
The title prints at the end of the page with no items, and the items
print on the next page without a title.
th image does not appears. If at sent reply time you do not see it, most probably, the image cant be seen. In that case, place the image url so people can (maybe) watch it from itds url.
OK, I understand what you want to prevent. In normal text, if you want two words to be on screen (and probably printed too), you use the Option-space (on OS X) “space” instead of the standard space character and teh two words will go to the next line together or stays in the current line if there is enough space to place them there.
Did you try to place the second object you want to stay with the title “inside” the title control “as a child” ?
When you put two controls one above the other, the IDE draw a red square around the “father” control.
I am sorry, I tried, once, to use Reports, but it was late in the development process and I stop the investigqtions after one day and wrote my own “print routines”. I never had time to re-investigate Reports since then.
I’m familiar with the non-breaking space, but I don’t see anything in reports to use that.
The link works… right click and ‘open image’. You might understand better what I’m asking about.
I don’t know why the image doesn’t appear inline in my post.
I thought it might be a useless question given how much attention the report generator gets.
Here’s another link. Can’t seem to get dropbox to cooperate.
The category title at the red arrow is what I would like to prevent.
The title prints at the end of the page with no items, and the items
print on the next page without a title.
If I could tell where on the page the Group Header will print, I can
add that to the height of the next couple of lines. If they don’t fit, then
end the page so that the group heading is at the top of the next page.
With BKS Shorts this isn’t terribly hard to do since you have total control over where things are placed. The drawback is that a) you’d have to rewrite it (completely different reporting tool) and b) well, it’s a complete rewrite and c) it’s not a free tool.
In BKS Shorts I’d create a GroupItem for each Group and then when placing them on the page figure out if it’s going to overrun the page. The drawback to this is approach would if you want to split it. But with cloning and some other things it’s certainly doable.