Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Page breaks in a report ...
Message
 
 
To
18/10/2001 18:01:09
Denis Filer
University of Oxford
United Kingdom
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00569130
Message ID:
00570784
Views:
20
>Nadya, thanks. I'll check these articles. I can add a field to the data file to store calculated length of each record at a given memo width - allowing me to compare remaining page lines and the longest of the pair to print next. Im not yet sure how I can use this variable to throw a page. Something to do with 'Starting a new group on a new page' perhaps. Is this a good time to mention how impressive the UT web site is? I am quite taken aback by it.

Denis,

I was thinking about this problem and bellow is a scheme for solution (simplified, of course):

Add a field to your table called nPage (I).

Create a program, similar to this:
local nPage, lnLinesCount
nPage=1
lnLinesCount = 0
#define MAX_LINES_PER_PAGE 40 && Number of total memo lines to fit on one page
scan
  if m.lnLinesCount > MAX_LINES_PER_PAGE && Need to start a new page
     nPage = m.nPage+1
     lnLinesCount = memlines()
  else
     lnLinesCount = m.lnLinesCount + memlines()
  endif
  scatter field nPage memvar 
endscan
Of course, this is just an idea, and your real program would be much more complicated... Set group by nPage and set it to start from the New Page.

Hope this helps.

If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform