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

Printing 'Continued' after grouping page break

Status
Not open for further replies.

MossNelson

Programmer
Oct 30, 2003
26
US
Hi,

How can I print the word "Continued" after the text in my Group Header reprints on a second page ?

I can add an IIF condition after the original text itself but how do I tell that a page break has occurred ?

I am using VFP 9

Thanks
 
Let's assume that your grouping is based on a field called ID.

1. Create a report variable called prevID
2. Have the "Value to store" be ID
3. Give it any old "Initial value"
4. Have it "Reset value based on" Group: ID
5. Then for the "Print when" condition of your "Continued" caption use the expression "ID = prevID AND _pageno != 1"

Jim
 
Also, if you reset the page number for each group you can try one of these two ides:

1] In the title text have something like:

Code:
"Transaction History " + iif(_pageno<>1,"(Continued)","")

or
2] Have a special text or caption with "_pageno<>1" in the PrintWhen method.

Steve
 
>>> Have it "Reset value based on" Group: ID <<<

Jim,

I don't understand... if the variable resets only every time the group ID changes then this does not tell me if the group has rolled over to the next page.

For example, if I have a group called "Filters" and in the Group Header it says "Filters" and then in the Detail there are 3 pages of products - I want the Group Header to reprint on pages 2 and 3 as "Filters, (Continued)"
 
Hi nmoss,

If you're printing a group header and the variable hasn't reset, that means that this is a "(Continued)" header. A test case based on this logic works for me.

Jim
 
<<if the variable resets only every time the group ID changes then this does not tell me if the group has rolled over to the next page.>>

The Reset in question refers to when the variable returns to its initial value. For each record, it's updated with the Value to Store.

Tamar
 
Hi Tamar,

In the scenario I described above the report variable never returns to its initial value (except by coincidence), and it isn't updated with each record. Its value is reset (to the "Value to store") only when the group changes.

Jim
 
The behavior of report variables is that when you reach the Reset point, they're reset to their initial value. Then, on each record, they're set to the Value to Store.

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top