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

Creating a page number

Status
Not open for further replies.

jtr9999

MIS
Jan 25, 2008
27
US
I have a report that has some subreports in it. The subreports could be any number of pages long. We have a machine in our mail center that would stuff our statements for us. The barcode formula for this machine consists of 5 characters. Charater 1 and 5 are always an *. Charater 3 is always a G. Character 2 is an A on ever page except the last page were it is a B. Character 4 is a repeating rolling A-Z.

The problem I am running in to is creating a page number so I can create the rolling A-Z. I got a formula from someone on this site that helped me convert the page number into a character. I was using the formula below to create the page number. When this hits a subreport that has more than one page it stops counting and then pics up again when it comes to the next statement set. I am needing the page number to be in the page header since that is where the barcode needs to be. Hopefully this make sense.

whileprintingrecords;
numbervar y;
y := y + 1;

thanks
Jonathan
 
Sub Reports do not have Page Header/Footer sections, but you can create "dummy" page header sections using Groups.

In the sub report, create a group on any field using a Specified Order called ALL and setting it to "is any value". Then in the Group Options, select "Repeat Group Header on Each Page", and the Group Header becomes a section that behaves like a page header.

You will need to use Shared variables so that the page number can continue to accrue from main report to sub report and back, but it should be achievable.

Hope this helps,

Cheers
Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top