问题
I'm working on ssrs report,i need to hide the header on last page for that I did visibility changes to the controls inside the header whatever I used.
I used this code
=IIF(Globals!PageNumber = Globals!TotalPages - 1 or Globals!PageNumber = Globals!TotalPages ,true,false)
it's working fine.
but after hiding the header controls the header white space showing on last page. i need to remove the white space occupying by header is there any way to remove that.
回答1:
You are hiding the controls on that expression so even if the controls are hidden then also the header is there. So that header is still occupying the white space. You can not hide header or remove that whitespace(As far as I know) but there is another approach you can try.
Add your header content on the reports main body and set the visibility expression there.
There is one catch though you can not access the PageNumber directly in the report body for that you need to 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
来源:https://stackoverflow.com/questions/28274855/hiding-and-removing-white-space-of-header-in-ssrs-report