Monday, May 14, 2012

Page Header need to be changed based on Group and Page Header should be appear if data is processed more than one page

While I am working with Reports today I faced one problem,” Page Header is not displaying dynamically based on group, if data is processed more than one page”.
For this I did some R&D and finally got solution for this
Below is the solution
Step 1:
Custom Code:
Dim lastHeader As String = Nothing
Function GetHeader(ByVal currentfooter As String) As String
If Not currentHeader = Nothing Then
lastHeader = currentHeader
End If
Return lastHeader
End Function

Step 2:
Create a group on which your report needs to be display on Page header and Make it asVisble/Hidden ( Depend upon your requirement)

If it is hidden ,then apply hidden property like below



Step 3:
=Code.GetHeader(ReportItems!Fields.Value)



Now you can see the Result . Report Header will change Dynamically according to group and If group data is More than one page in all pages report header will appear

No comments:

Post a Comment