Search code examples
reporting-servicesssrs-2008ssrs-2008-r2ssrs-tablix

After exporting SSRS report into excel I need to see 2 different headers in 2 tabs?


I have a SSRS report with 2 Tablix in it, I used a page break property to export the data into 2 different tabs in excel it’s works fine, After exporting the report into excel I need to see 2 different headers in 2 tabs?


Solution

  • In the header section you can use a placeholder and set the contents dynamically using an expression. Following expression should get the desired result:

    =IIF(Globals!PageNumber=1,"Heading1","Heading2")
    

    Taking into consideration you are using excel export you will most likely have only two pages so the above code should work.