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

Keep a rs of the page numbers in CR?

Status
Not open for further replies.

lovevthokie

Programmer
Oct 16, 2001
19
US
I am running CR 8.5 on VB 6 using the RDC method. I have a grouping of each assembly in a project. I need to know what page number each assembly group is on to pass to a subreport that will display at the end like a Table Of Contents. Does anyone know how I can keep track of this value for each assembly so that I can display each assembly group name and it's page number on the subreport at the end?

Thanks in Advance!
 
Setup a counter and reset it every time you change group.
 
How will a counter determine what page the group starts on?
 
I found a way you could do it, but it has its limitations. You could create a formula with the following code:

StringVar myPageNums;

if OnFirstRecord then
myPageNums:= ToText(PageNumber,0)

else
myPageNums:= myPageNums+ "," + ToText(PageNumber,0);

myPageNums

Drop this formula in your group header, and it will return the page numbers of each group in the following format: 1, 1, 3, 4...
where the 1st and 2nd group are on page 1, the 3 group is on page 3 and so on.

You could then pass the value of myPageNums to your sub report and create your table of contents.

Now, the limitation in this is that myPageNums is a string, and a string cannot contain more than 254 characters.

If you know it will never get greater than that, then this will work for you. Otherwise, I really don't know how you could do this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top