{"id":33,"date":"2013-03-20T07:01:00","date_gmt":"2013-03-20T01:31:00","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=33"},"modified":"2013-03-20T07:01:00","modified_gmt":"2013-03-20T01:31:00","slug":"show-different-headerfooter-on-different-pages-of-ssrs-report","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2013\/03\/show-different-headerfooter-on-different-pages-of-ssrs-report\/","title":{"rendered":"Show different Header\/Footer on different pages of SSRS report"},"content":{"rendered":"<div dir=\"ltr\" trbidi=\"on\">\n<div><span><span><span><span>Sometimes, there\u00a0are requirements to show different Header\/ Footer on different pages of the report.<\/p>\n<p><\/span><\/span><\/span><\/span><\/div>\n<div><span><\/span><\/div>\n<div><span><span><span>Like say, on the first page, header\/ footer of report should be some text and on the second page it should be some different text. Please refer below screenshots.<\/p>\n<p><\/span><\/span><\/span><\/div>\n<div><span><\/span><\/div>\n<div><b><span><span>First Page Footer<\/span><\/span><\/b><\/div>\n<div><a href=\"http:\/\/3.bp.blogspot.com\/-lByqPd1wDsE\/UUlazZWPowI\/AAAAAAAABpg\/L2IJRiZ1Wmo\/s1600\/blog1.jpg\" imageanchor=\"1\"><span><img decoding=\"async\" border=\"0\" src=\"http:\/\/3.bp.blogspot.com\/-lByqPd1wDsE\/UUlazZWPowI\/AAAAAAAABpg\/L2IJRiZ1Wmo\/s1600\/blog1.jpg\"><\/span><\/a><\/div>\n<div><a href=\"http:\/\/4.bp.blogspot.com\/-K3IVWNZyrFs\/UUlTBquaRaI\/AAAAAAAABpM\/2YAIij65zSY\/s1600\/blog1.jpg\" imageanchor=\"1\"><span><\/span><\/a><\/div>\n<div><\/div>\n<div><span><span><span><\/span><span><strong><span>Second Page Footer<\/span><\/strong><\/span><\/span><\/span><\/div>\n<div><a href=\"http:\/\/1.bp.blogspot.com\/-xOrUUIDkR_8\/UUla6B_c2tI\/AAAAAAAABpo\/1oQtBWHOEWI\/s1600\/blog2.jpg\" imageanchor=\"1\"><span><img decoding=\"async\" border=\"0\" src=\"http:\/\/1.bp.blogspot.com\/-xOrUUIDkR_8\/UUla6B_c2tI\/AAAAAAAABpo\/1oQtBWHOEWI\/s1600\/blog2.jpg\"><\/span><\/a><\/div>\n<div><\/div>\n<div><span><\/span><\/div>\n<div><span><span>This can be achieved using the solution as described below:<\/span><\/span><\/div>\n<div><span><span>You need to write a simple expression on the textbox control which is placed on the footer. Here you can utilize expression \u201c<b>Globals!PageNumber<\/b>\u201d which is used to show page numbers. This expression returns the page number, and we can alter this to show different footer on different pages.<\/span><\/span><\/div>\n<div><span><span><span>You need to write following expression on the textbox control.<\/p>\n<p><\/span><\/span><\/span><\/div>\n<div><span><span><\/span><span><span><span>=IIf(cstr(Globals!PageNumber)=<span>&#8220;1&#8221;<\/span>,<span>&#8220;1111-XYZ (2012\/12)\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a9 ABC Sol, 2012&#8221;<\/span>,<span>&#8220;1111-XYZ (2012\/12)&#8221;<\/span>)<\/span><\/span><\/span><\/span><\/div>\n<div><span><span><span><\/span><\/span><\/span><span><span>If the report page is the first page, then this expression would set the specified text else it would display alternate text.<\/span><\/span><\/div>\n<div><b><u><span><span>General Syntax<\/span><\/span><\/u><\/b><\/div>\n<div><span><span>=IIF(cstr(Globals!PageNumber)=\u201d<Page Number>\u201d,\u201d <Text to display on the specified Page number> \u201d , \u201d <Text to display on other page>\u201d)<\/span><\/span><\/div>\n<div><span><span>Similarly, you can use this expression to show different header on different pages as well.<\/span><\/span><\/div>\n<div><\/div>\n<div><span><span><span>Hope this article helps!<\/p>\n<p><\/span><\/span><\/span><\/div>\n<div><span><\/span><\/div>\n<div><span><\/p>\n<p><span><shapetype coordsize=\"21600,21600\" filled=\"f\" o:preferrelative=\"t\" o:spt=\"75\" path=\"m@4@5l@4@11@9@11@9@5xe\" stroked=\"f\"><span><span><stroke joinstyle=\"miter\"><formulas><f eqn=\"if lineDrawn pixelLineWidth 0\"><f eqn=\"sum @0 1 0\"><f eqn=\"sum 0 0 @1\"><f eqn=\"prod @2 1 2\"><f eqn=\"prod @3 21600 pixelWidth\"><f eqn=\"prod @3 21600 pixelHeight\"><f eqn=\"sum @0 0 1\"><f eqn=\"prod @6 1 2\"><f eqn=\"prod @7 21600 pixelWidth\"><f eqn=\"sum @8 21600 0\"><f eqn=\"prod @7 21600 pixelHeight\"><f eqn=\"sum @10 21600 0\"><\/f><\/f><\/f><\/f><\/f><\/f><\/f><\/f><\/f><\/f><\/f><\/f><\/formulas><path gradientshapeok=\"t\" o:connecttype=\"rect\" o:extrusionok=\"f\"><lock aspectratio=\"t\" v:ext=\"edit\"><\/lock><\/path><\/stroke><\/span><\/span><\/shapetype><\/span><\/p>\n<p><\/span><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes, there\u00a0are requirements to show different Header\/ Footer on different pages of the report. Like say, on the first page, header\/ footer of report should be some text and on the second page it should be some different text. Please refer below screenshots. First Page Footer Second Page Footer This can be achieved using the\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2013\/03\/show-different-headerfooter-on-different-pages-of-ssrs-report\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[20,21,22,58],"tags":[879,1293],"class_list":["post-33","post","type-post","status-publish","format-standard","hentry","category-dynamics-crm-2011","category-dynamics-crm-2013","category-dynamics-crm-2015","category-ssrs-reports","tag-header-footer","tag-paging"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/33","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=33"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/33\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=33"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=33"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=33"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}