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

Two Series of Page Numbers?

Status
Not open for further replies.

SGLong

Programmer
Jun 6, 2000
405
US
Is it possible to have a report with two series of page numbers running? I have a lengthy report that is grouped by client transactions. I reset the page number to 1 at the start of each client group, but I'd also like a running page number count for the entire report.

Steve
 
Create a field in the page footer and paste this into it:

"PAGE "+ALLTRIM(STR(_pageno,10,0))+" of "+ALLTRIM(STR(_pagetotal,10,0))

Regards,

Rob
 
Rob,

Unfortunately I'm stuck using VFP6 and _pagetotal is not available to me. I'm not sure it would do what I want anyhow.

Essentially I need two page numbers on a page: the page number for the current group, and a running page number for the entire report. For example, if the first group were 14 pages long, the first page of the second group would show both a 1 and a 15.

Steve

 

Steve,

How about this ...

Create a report variable. Call it, say, ClientPage. Specify that it should reset on each change of client group.

Then, add this expression to the page footer:

Code:
"Page " + transform(_pageno) + " / " + ;
  transform(_pageno + ClientPage)

I haven't tested this ... it's just off the top of my head.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Rob:

We're stuck on VFP6 because the "powers that be" don't want to go thru all the due diligence required to ensure that a step up to a recent version won't cause any problems. All my development is being done in VFP 8, but I have to stay away from Non-6 features (i.e. Cursor Read-Write, Cursor to XML, etc). When I'm done with coding I have to compile in 6.

Mike: Your idea looks promising. I'll experiment with it.

Steve
 
public pnpages
local lcfile
lcfile = sys(3)+ ".tmp"
lnhandle = fcreate(lcfile)
fclose (lnhandle)
report form xxxxx to file (m.lcfile) noconsole
erase (m.lcfile)
pnpages = _pageno
wait clear
report form xxxxx to printer prompt preview

***pnpages is totalpage
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top