Search This Blog

Wednesday, March 4, 2015

Repeat Header on every page in SSRS Report

Yesterday i got one new task in SSRS that to repeat header on every page and that will have two columns (company logo + address) but the address not to be repeat on every page.

I googled a lot and at most of the sites found that option "Repeat header rows on each page need to be repeat" need to be check or set the tablix property "RepeatOnNewPage" to True.








But all those solutions not worked for me because that were in the context of table.

After that i tried below simple steps:

1. Add the page header.


2. Insert the image and text box in report header.







3. After creating text box and writing text. Click on preview and save the report as pdf. 



4. I noticed the report header repeating itself on every page which supposed to be because header and footer will repeat themselves on each page.



5. So now need to hide the address text box from the other pages for which go to the text box properties --> visibility --> select show or hide based on an expression --> click "fx" --> enter "=IIF(cstr(Globals!PageNumber)="1",False,True)" --> click OK.






Basically expression "=IIF(cstr(Globals!PageNumber)="1",False,True)" show the text box only where page number is "1".
You can read more about expression at https://msdn.microsoft.com/en-us/library/ms157328.aspx




6. Preview the report again and save it as pdf and you will notice logo is visible on all pages but address is on only first page.






No comments:

Post a Comment