Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: tushar Kanvinde
  Where is tushar Kanvinde?
 Kolhapur, Maharastra
 India
 tushar Kanvinde
 To: Brad Schulz
  Where is Brad Schulz?
 San Carlos
 California - United States
 Brad Schulz
 Tags
Subject: RE: Report page eject problem
Thread ID: 104655 Message ID: 104685 # Views: 1 # Ratings: 0
Version: Visual FoxPro 6 Category: Reports and Printers
Date: Saturday, August 19, 2006 7:57:26 AM         
   


vb6 has a function printer.textheight which gives the height that will be occupied by a text on the printer. so it is not impossible but pretty painful. you will need to create a vb dll for that. pass the memo to it and find out the height required.
> > Hi all
> >
> > Got a mental block on this one.
> >
> > I have a report which prints among other things a memo in the details band, the field ("Comments") is set to stretch with overflow. All works fine.
> >
> > The client has asked me to change the report so that if the entire memo will not fit on the current page then eject the page and start a new one.
> >
> > I can't think how to do this.
> >
> > Any clues gratefully received!
> >
> > Best wishes
> > Graham

>
>
> Someone correct me if I'm wrong, but I think this is impossible. Different printers render the same font in different ways, so you'll never be able to predict how much space a string will take up and how the line breaks will come in and therefore you can't know how many lines a memo will take up on a printed piece of paper.
>
> Maybe there's a really fancy way to do this with Report Listeners that I don't know of, but outside of that, I don't think you can do what you want.
>
> I think all you can do is approximate the average #lines of a memo and reserve space for it (and maybe a little extra). But I guarantee you'll come up against a memo SOMETIME in the future that will be just a little longer than that and will end up overflowing onto another page.
>
> Sorry to be discouraging. If someone has an ironclad solution, I'd love to hear it.
>
> --Brad


ENTIRE THREAD

Report page eject problem Posted by Graham Brown @ 8/18/2006 7:19:37 PM
RE: Report page eject problem Posted by Brad Schulz @ 8/18/2006 7:49:15 PM
RE: Report page eject problem Posted by tushar @ 8/19/2006 7:57:26 AM
RE: Report page eject problem Posted by Graham Brown @ 8/19/2006 3:18:10 PM
RE: Report page eject problem Posted by Brad Schulz @ 8/19/2006 9:37:32 PM
RE: Report page eject problem Posted by Ken Murphy @ 8/20/2006 3:20:38 AM
RE: Report page eject problem Posted by tushar @ 8/20/2006 9:49:30 AM
RE: Report page eject problem Posted by Ken Murphy @ 8/18/2006 8:13:51 PM