Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Conditional breaking
Message
From
08/04/2011 18:21:11
 
 
To
08/04/2011 12:39:37
Gary Foster
Pointsource Consulting LLC
Chanhassen, Minnesota, United States
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
01506666
Message ID:
01506739
Views:
50
>Hi all,
>
>I have a report that has groups with varying detail lines, say 1 to 7 or so. I want to force a new page for any group that can't fit on a page. IOW, my users don't want the detail lines to span pages.
>
>I can write a UDF to determine how many detail lines there are for a given group. How can I tell how many lines are left on the page and how to trigger a page break?

You just can't. Neither force page break, nor determine precisely how many lines can be fit in a page. (You could count the lines but
you have to also account for group headers, footers (etc) which is nearly impossible, unless you report in plain text mode.

If your situation allows, You might wanna have look at www.report-sculptor.com

There is a property of RS engine which tells you current remainder of the page in pixels. However paradigm of building reports is NOT
FRX/Report Designer, but instead you build your report using standard form and form objects. You detail band would be in this case ordinary form container which have standard property called 'height'. When you have height of detail container, and also report engine property that keeps track of what is the current remainder of the page in pixels, and you have control of weather to execute that report band (or eject page), you get much better chances of keeping your group content (detail lines) together in one page
then it is case (no chance!) with FRX.

It gets more difficult when you have to control bands that contain blocks of text, but you can use RS engine text measure
method (get text height in a given width) to increase height of a given container prior executing it as band.

I know that it sound all weird, but once you get familiar with this new reporting paradigm(s), word 'impossible' have very little meaning
when it comes to building reports :)

HTH
Sergio
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform