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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Close the rectangle on each page

Status
Not open for further replies.

keithchansc

Programmer
Jan 16, 2004
13
0
0
HK
I place a rectangle shape from Group Header to Group Footer, Can I close the rectangle on each pages before group actually ended ?
In Crystal Report, there's a option in Box shape 'Close Border on Page Breaks', Is there any similar feature in VFP report ?
 

You can close your shape on page break if you run it through the whole design page and close it somewhere in the page footer. This way, it will surround the whole page - even if your group ends somewhere in the middle. Don't know if that's what you want.

Alternatively, you can draw 2 shapes that overlay each other on the top, but end in different places (one at the end of the group, another in the page footer. Then think of criteria and use Print-When condition to manipulate them.

But I got to say, I almost never use whole rectangle shapes in my reports. I use vertical and horizontal lines to build my own. They close wherever and whenever I want, can have different pen size and style on all sides, and whole lot of other benefits. When you get a hang of it, they are not too much of a hassle, either.

I just put vertical line bits (not whole lines through the whole report design page!) on both sides of each band that needs them, and make them connect using Layout toolbar. (It might take you a preview or two initially, to get a sense of where to start and finish them.) Then I put my horizontals at the end of each band that needs to close with it. In some reports, I put it after each detail line, but use Print-When to make it print only every 5 or 10 lines. Same thing can be done with the line in the page footer (only print when you need it). That's all to it. The only issue you might face is to stretch your vertical bits when you stretch your bands.

I must note that I use VFP6, and as far as I know, the Report Designer didn't change much through VFP8. There are some significant changes in the Report Designer in VFP9, but I cannot advise you on those. But even though it might have what you want already built in, the method I described will still work.
 
Hi Stella,

Thanks for you advice.

The report I am working is printing an Invoice,

I put the signature part on Page Footer band, and set it to print only in the last page. I use Page Footer since I want a contant detail band height across all pages.

Then I need to print the Invoice Total on the last page, with an optinal Invoice Remark, It should appear before the signature, but after the detail band with rectangle closed. That's why I can't extend the rectangle into Page Footer - otherwise the Invoice Total and remark will be printed inside the rectangle with vertical lines crossing them.

I am using VFP9, but I think the report design concept is similar to VFP6. Should I use the summary band ?

Keith
 

Invoice Total on the last page, with an optinal Invoice Remark, It should appear before the signature, but after the detail band ...
Should I use the summary band ?


Well, that's what Summary band for.

Alternatively, you can create another group, external to all your data, and put your Summary stuff in this group's footer. Close your shape in the previous group's footer.

But neither will help you to close the shape at the page break.

Here is what you can try.

Does your report flows for several pages and breaks only where groups end?

If so, and if your rectangle satisfy your needs other than not closing at the end of the page, you can try to put just a single horizontal line in the very beginning of the footer page, and program it to print everywhere except the last page. Should do it.

Check carefully, though, what you get if it also happens to be at the end of the group. In this case, you might get 2 lines instead of one. If it is so, think how you would handle it.

Otherwise, just get rid of all the shapes and build your borders yorself. Just a tad more work, but you will have much more control over the output.




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top