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!

get PageNumber in subreport 1

Status
Not open for further replies.

koo9

Programmer
Jun 5, 2001
6
CA
hi all,

I have a subreport in the detailsection. I need to get the pagenumber in a formula in the subreport,
but what I am getting is the pagenumber starting from 1 (not continue from the main report) and I
have checked the previous section and make sure that it didn't "Reset page number after".

the question is how can I get the pagenumber that continue from the main report?

Thanks

Kevin
 
There is probably a simpler, better way, but it is Monday and this is the first method i thought of, so ....

place this in the details section of your main report
//{@SharedPageNumber}
shared stringvar pn := pagenumber;


place this in your subreport
//{@DisplayPageNumber}
shared stringvar pn;
pn + pagenumber;

you many need to replace the line "pn + pagenumber" with "pn + (pagenumber -1)"
 
yup, it works that's actually what I did after I posted this message.

Thanks anyways :)

Kevin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top