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

Two Page Group Footer in Report/VFP6

Status
Not open for further replies.

CFace

Programmer
Feb 7, 2007
5
US
Hi All,

I have a situation where client needs a blank page generated in a duplexed report stream anytime a group ends on the front side of a sheet of paper. They don't want the first page of the subsequent grouping to begin on the back of a page of a previous grouping.

These are multipage invoices.

So, anytime the group footer finishes printing on page 3, 5, 7, etc., I need to ensure a blank page 4, 6, 8, etc. exists in the stream.

The best results I was able to achieve so far involved adding a memo field to the parent table's structure and filling it with 90 carriage returns. I then located that field at the bottom of the group footer with stretch and print when to only print when it _pageno was odd (3,5,7,etc.). I also had remove line if blank checked.

This gave me what I wanted in most cases but wasn't consistent.

Oddly, it worked out pretty well on my Brother Laser, but not so well when we used the production printer, a Heidelburg Digimaster 9110.

I tried variations... like having the memo field in the group footer. Creating another group surrounding the main grouping (invoice #) on a field that was equivalent to the invoice # and locating the memo field in the group footer of this surrounding group instead.

Can anyone suggest some tips for making this happen consistently WITHOUT having to resort to printing a separate report for each grouping?

They're requesting the output to be a single report job rather than thousands of small jobs.

Thanks in advance,

Stewart

 
Please note:

I tried variations... like having the memo field in the group footer. Creating another group surrounding the main grouping (invoice #) on a field that was equivalent to the invoice # and locating the memo field in the group footer of this surrounding group instead.

should instead be:

I tried variations... like ... Creating another group surrounding the main grouping (invoice #) on a field that was equivalent to the invoice # and locating the memo field in the group footer of this surrounding group instead.


 
Hi Stewart,

As the last line of your group footer insert a field like:

REPL(CHR(13), 5000)

Have it stretch with overflow, and have it print only on odd pages. This should do it.

Jim
 
Hi Jim,

I appreciate your suggestion and after a quick lookie, it appears to deliver similar results as the method I described.

What also happens is that the report's page header prints on the extra forced blank page. Client wants a blank page.. no header.

Would you know of a way to suppress page header on this blank page under these circumstances?

The best result I got was with the two nested groups and then playing with the print whens. When the forced blank page was placed into the stream, I was able to get it with no header.

However....

When the group footer "alone" (detail stopped at bottom of previous page) was thrown to the top of even numbered page, I wasn't able to get the header to print and we want it to print under that circumstance.

That was as close as I came to a complete solution.

Thanks for the help,
Stewart
 
Hi Stewart,

Funny, with the exception of the page header problem, my little test case works perfectly using the method described above. Must be something in your situation I'm unaware of.

As to the page header what comes to me off the top of my head is this: instead of putting REPL(CHR(13), 5000) directly on the report create a function which returns that value and also sets a memory variable switch ON to indicate that the blank page has been sent. So on the report you would "print" myfunction() (even numbered pages only). Printing the page header should then be made conditional on the setting of the switch. A corresponding function to set the switch off would also need to be created. This could be invoked in the group header, I suppose.

Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top