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!

Page numbers within group 2

Status
Not open for further replies.

ioj

Programmer
May 19, 2006
2
US
I have a fairly simple report with grouping. What I need, is to provide the page number within each group (in the "N of M" format). So, if the first group spans three pages, the first page would show "Page 1 of 3", the second--"Page 2 of 3", and the third--"Page 3 of 3". The next group, say, a two-page one, would start with "Page 1 of 2" and so on.

Is there an easy way to achieve that? Any tips would be much appreciated.
 
Never mind, I figured it out. Thanks.
 
Hi

I have the same problem but have not figured it out - pls can you shed some light for me?

Thanks

 
hi,
Please somone help me on the same issue.
Thanks in advance
 
I'm looking for the answer to this question also. Can anyone tell me how to do this?
 
I found this on the Actuate Club Forum. Looks complicated, have fun
How to reset page numbers at the group level for Actuate Reports:
1. Add two integer controls to the PageStyle of your report. The ValueExp will be tempCounter + 1 and tempCounter resepectively

2. Double click on the New Report App and select Variables tab Add a new variable called tempCounter (Integer, Static, and Public)

3. To the first group section, modify the sub Start method as follows:
Sub Start( )
Super::Start( )
tempCounter=0
End Sub

4. If not already present, add a second Content Group section to your existing group section.

5. Override the Sub Finish method as follows:
Sub Finish( )
Dim PageIterator As AcIterator
Dim Pg As NewReportApp::page //Page = your Pagestyle component name
Dim PgList As NewReportApp::portrait //Portrait = Pagelist component name
Dim currControl As AcIntegerControl
Dim count As Integer
Dim currIndex As Integer

Set PgList=GetPageList()
currIndex=PgList.GetPageCount()
Set PageIterator=PgList.GetContentIterator
PageIterator.SkipTo(currIndex-tempCounter+1)

Do While PageIterator.HasMore()
Set Pg=PageIterator.GetNext()
Set currControl=Pg.FindContentByClass("NewReportApp::page::IntegerControl2") //name of second integer control
currControl.DataValue=tempCounter
Loop

Super::Finish( )
End Sub

6. Override the Sub StartPage( page As AcPage ) as follows:
Sub StartPage( page As AcPage )
tempCounter = tempCounter+1
Super::StartPage( page )
' Insert your code here
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top