Hi, I'm new to reporting services. My report has 3 groups in it. I need to create table of contents for the 3rd group, for example, Name, like:
Name - the page number of the report where this name starts.
In addition to this I need when the table of contents starts pages start in alphabetical order form "a", like Page (a), Page (b) and so on. I wrote the following function in the code:
Shared CurrPageNo as integer =0
Shared ContentPageNo as integer =0
Public Function CurrentPageNumber(ByVal PagesLeft as integer,ByVal HasTableOfContentStart as string) AS String
dim strPageLabel as string
strPageLabel = "Page "
if (HasTableOfContentStart ="Y")
if (PagesLeft > 0)
ContentPageNo = ContentPageNo +1
end if
end if
CurrPageNo = CurrPageNo +1
if (HasTableOfContentStart ="Y")
strPageLabel = "Page (" & Chr(96+ContentPageNo) & ")"
else
strPageLabel = strPageLabel & CurrPageNo
end if
Return strPageLabel
End Function
the textbox in the report footer where I call the function has the following expression: =Code.CurrentPageNumber(Globals!TotalPages - Globals!PageNumber + 1, ReportItems!textbox55.Value)
//ReportItems!textbox55.Value="Y" - means the we are in the table of content
I forgot to mention that I have table of contents in the second table on the same report.
When I preview in HTML I see pages for the Table of Contents start from Page (a) as it should, but when I print report the first page on the Table of contents starts from Page (i) and so on.
Please help!!!. Thanks
|