hiding and removing white space of header in ssrs report

谁说我不能喝 提交于 2019-12-08 09:18:04

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!