SSRS報表基本結構與設定

來源:互聯網
上載者:User

標籤:ssrs   報表格服務   報表設計   

SSRS報表基本結構與設定

整個報表設計雨區基礎的結構可以分為“頁首(Page Header)”、“頁尾(Page Footer)”、“主體(Body)”以及“資料”等四個主要的地區,如所示。設計畫面中預設只顯示主體以及資料區域,如果需要開啟頁首或是頁尾,則必須在主體外側空白處右擊,開啟頁首頁尾地區,便可顯示與設計。

 

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image002" alt="clip_image002" src="http://s3.51cto.com/wyfs02/M02/58/CF/wKioL1S9wDuicrs4AAHfrwH9Js0854.jpg" border="0" height="570" />

 

頁首與頁尾主要是用來放置整份報表共同的說明性資訊,例如:頁碼、製表日期、審核單位等。需要注意的是,由於頁首與頁首屬於說明性地區,因此,頁首頁尾內的條目有邏輯上的限制,所以不允許設計者在其中放置資料表、矩陣、列表等資料區域條件,至於頁尾等內建欄位,也僅供頁首、頁尾地區使用。

 

1. 報表

 

瞭解報表設計地區後,接下來可以設定報表屬性。

n 從“Properties”視窗的下拉選項單擊“Report”,便可修改報告的基本設定。

 

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image004" alt="clip_image004" src="http://s3.51cto.com/wyfs02/M02/58/CF/wKioL1S9wD3wsiueAACPVzYFBKw529.jpg" border="0" height="241" />

 

n 在報表主體外側空白處右擊,選擇“Report Properties”,即可進入報表屬性對話方塊。其實設定內容與上述方式相同,只不過將屬性設定封裝為可視化介面,因此,操作起來比較簡便。

 

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image006" alt="clip_image006" src="http://s3.51cto.com/wyfs02/M00/58/CF/wKioL1S9wEGwHiYWAAE06SsXtBI980.jpg" border="0" height="504" />

 

其中值得一提的是Columns屬性,利用Columns屬性可以縱向切割版面,以產生更精細的排版效果,是將Coumns屬性設定為2之後的結果。

 

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image008" alt="clip_image008" src="http://s3.51cto.com/wyfs02/M01/58/CF/wKioL1S9wETgSeU3AACJZaDC-1g445.jpg" border="0" height="243" />

 

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image010" alt="clip_image010" src="http://s3.51cto.com/wyfs02/M02/58/CF/wKioL1S9wEnAVYeVAAE3SGUVF8U292.jpg" border="0" height="467" />

 

此設定與長度相關的報表屬性時要注意的是,報表設計師會根據目前作業系統中“Region and Language”的設定,而決定該使用厘米(cm)或是英寸(in)為度量單位。

 

2. 頁首與頁尾

 

在報表格式中,通常會利用“頁首”和“頁尾”地區來放置關於這份報表的備忘項目、包括公司的LOGO、報表主題以及頁碼等,而且通常“頁首(Page Header)”和“頁尾(Page Footer)”會從報表的第一頁至最後一頁重複顯示相同的內容。在SSRS中也提供頁首頁尾的設定,不過,目前只能提供文字框、映像與邊框,禁止將資料區域、子報表或是任何資料區域條件放在“頁首(Page Header)”和“頁尾(Page Footer)”。

 

加入“頁首(Page Header)”、“頁尾(Page Footer)”首先要切換至報表設計的“Design”標籤頁。有以下幾種方式可以開啟關閉頁首頁尾:

n 選擇功能菜單的“Report”、“Add Page Header”或“Add Page Footer”選項。

n 直接在報表主體周邊空白處右擊即可加入頁首頁尾。

 

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image012" alt="clip_image012" src="http://s3.51cto.com/wyfs02/M00/58/CF/wKioL1S9wEqhJEsYAACp1phQzAQ978.jpg" border="0" height="177" />

 

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image014" alt="clip_image014" src="http://s3.51cto.com/wyfs02/M01/58/CF/wKioL1S9wEyi_pjUAACbagDZNY4840.jpg" border="0" height="202" />

 

其中,SSRS預設“頁首(Page Header)”和“頁尾(Page Footer)”會出現在報表的第一頁和最後一頁(也就是PrintonFirstPage以及PrintonLastPage為True),若要變更此設定,必須自行變更屬性值。

 

3. 主體

 

報表主體(Body)是用來陳列報表主要內容的地區。除了可以將表格、矩陣、列表等“資料區域”(顯示資料集的資料)放置在報表主體中,還可以放置其他“獨立報表專案”以輔助美化報表,在“屬性(Properties)”視窗的下拉式功能表中,只需選擇“主體(Body)”,即可設定相應屬性。

 

650) this.width=650;" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image016" alt="clip_image016" src="http://s3.51cto.com/wyfs02/M00/58/D2/wKiom1S9v3nCIw8aAACTHYkXsiI958.jpg" border="0" height="242" />


本文出自 “SQL Server Deep Dives” 部落格,請務必保留此出處http://ultrasql.blog.51cto.com/9591438/1606024

SSRS報表基本結構與設定

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.