Access Page number in report body In SSRS

前端 未结 4 1882
Happy的楠姐
Happy的楠姐 2020-12-03 15:00

I want to use Globals!PageNumber in Report body part. How can I access inside Report body?

I am using SQL Server Reporting Service 2008 R2.

4条回答
  •  难免孤独
    2020-12-03 15:55

    Create functions in the code under the report properties:

    Page Number:

    Function PageNumber() As String    
        Return Me.Report.Globals!PageNumber    
    End Function
    

    Total Pages:

    Function TotalPages() As String   
        Return Me.Report.Globals!TotalPages    
    End Function
    

    Access it in the body via an expression:

    =code.PageNumber & " of " & code.TotalPages
    

    Check out Sample Usage of the Concat Function

提交回复
热议问题