Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create new page when field does not fit on current page 1

Status
Not open for further replies.

manpaul

Technical User
Jan 10, 2005
118
CA
Thank you the filetostr() is work very nicely with streach on

Here is the delema now I can not have the field partly printed on one page then continued on the next page.

If there is not enought room for that field I want to start the printing on a new page.

I have a few fields at the end of the report that this will pertain to so I would like to do this by field not the sumary band
Thanks
Paul
 

You, probably, mean the report from your previous question, thread1252-1124859.

I would like to do this by field not the sumary band
What do you mean by that?
Summary band can contain fields, too.

I have a few fields at the end of the report that this will pertain to
Do you mean you have page footer? A summary band?

What band do you print your terms and conditions now?

Here is the delema now I can not have the field partly printed on one page then continued on the next page.
In most bands you cannot do it. The band prints on the page where it fits in whole. If group footer or summary band don't fit right below the data, they would be carried over to the next page in whole, not part.

Since you got to print your terms and conditions only once, and it is only about 8 lines, you can put it in either summary band, or create a group and put it in the group footer. Then add enough empty lines at the end of that band so the whole section wouldn’t fit below your invoice and get carried over to the new page.

If you want to break it, and not carry over in whole, you would need much more coding to calculate whether it fits, where to break it and how to do it.

If I were you, I would suggest to the client to put a line saying something like “See next page for terms and conditions” on the bottom of the main invoice page (say, in page footer, with “Print when” conditions), and put it on the next page in whole, in a way I described above.

 
It is a summary band that I have and all I want to do is not have the field split on two different pages.

There must be a something I can tick so the band will only print if there is enough room otherwise it will print on the next page
 

Your original post was not clear; I thought you want just the opposite.

Actually, I didn't think it would split. In any case, it does that automatically.

As I said, I would add a lot of blank space to the end of the band (just stretch it to take up more space), so it would always not fit with the data and print on the new page in whole. And I would put a note on the previous page, as I said above.

But I don't know what else is in your report, and what else is in the summary band.

If you have actual summary info in that band that you would like to keep on the same page as the data, I would create a group and put that summary info in the group footer instead of summary band, and leave only terms and conditions for the summary band.

Another way there is (but I guess I wouldn't go that route myself) is to calculate how much space your other info would take on the page. It could be done in the calling program. Just factor in, how many records is selected for the invoice cursor, how much space other bands would take, and how long is your Terms and Conditions string. Create some variable, either Logic or Numeric (say, 0 or .F. value for not enough room, 1 or .T. for enough room).
Add some invisible (colorless with no borders) shape right after your data, probably in specially created group footer, I guess. Put there "Print When" condition - print it only if there is not enough space. Make sure the shape is not too big, so it wouldn't be carried over to the next page - play with the size. Also, mark "Remove line if blank" for the shape, so as not to leave the space for the shape when it's not printed. Now, if you have enough room for terms and conditions, the shape wouldn't be there, and Terms would kick in. Otherwise, the shape will create the blank space on the page and push Terms to the next page.

Now, if you make changes to your report, you might want to check if your shape needs resizing, too.


 
Thanks for your help as it is work now.

THe last line I fix to bottom of band and now moves the whole band to the next page, which is what I wanted.

Paul
 
Hi Stella

I have a report that has 8 lines of static data with
'remove line if blank' on the left margin and a memo field starting at about the center of the page with stretch on.
The report will print correctly in most cases but will randomly leave a bunch of white before the horizontal line marking a new group band is printed. You mention calculating the amount of space is taken up with other data. Can you point me to a method or thread that does this?

thanks,
Ray Ross
 


Ray Ross,

I also mentioned that I wouldn't go that route myself ;-), meaning I would probably figure out how to do it if hard-pressed, but would avoid it at all costs otherwise.

For what it worth, I would guess that your "bunch of white" is not that random and can possibly be fixed with methods other that painstaking calculations. How random is random? Are those empty lines that not removed even though you think they should? Is your new group band printed on the same page or a new page? What you mean by 8 lines of static data? What band are they located in?

Why don't you start a thread of your own, with more info on your problem, and I or someone else here will try to solve it?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top