1 / 44

Microsoft SQL Server 2008 R2 報表服務

Microsoft SQL Server 2008 R2 報表服務. 胡百敬 (http://byronhu.spaces.live.com). 大綱. 報表設計的新 功能 存取報表的新功能 管理報表的新功能 開發 者的 新 功能. 設計環境比較 Report Designer. 整合在 Visual Studio 2008 內 整合在方案內 原始碼版本控管 在專案內支援開發多張報表 除了報表組件庫 ( Report Part Gallery ) 外,支援所有開發報表的功能 快速報表開發只支援一個報表精靈 針對專業的報表開發者設計.

sarai
Download Presentation

Microsoft SQL Server 2008 R2 報表服務

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Microsoft SQL Server 2008 R2報表服務 胡百敬(http://byronhu.spaces.live.com)

  2. 大綱 • 報表設計的新功能 • 存取報表的新功能 • 管理報表的新功能 • 開發者的新功能

  3. 設計環境比較Report Designer • 整合在 Visual Studio 2008 內 • 整合在方案內 • 原始碼版本控管 • 在專案內支援開發多張報表 • 除了報表組件庫(Report Part Gallery)外,支援所有開發報表的功能 • 快速報表開發只支援一個報表精靈 • 針對專業的報表開發者設計

  4. 設計環境比較Report Builder 3.0 • 單獨安裝的Windows Forms 應用程式,有 Office 風格的 ribbons • 只能開發單一報表 • 支援所有的報表開發功能 • 能存取共享資料集和報表組件 • 提供多種精靈輔助開發 • Table 或 Matrix 精靈、Chart精靈、Map精靈 • 針對 power user

  5. 使用 Report Builder 3.0 • 模式 • 建立個人的報表,不需要報表伺服器 • 連接到報表伺服器,以借助編輯時的一些功能 • 快取資料集 • 預設為當下的編輯會談(edit session)自動快取資料集 2 小時,以加速預覽。兩個小時後資料集會過期 • 透過重新整理按鈕以取得當下資料 • 外部參照 • 將報表存到報表服務的目錄下 • 可為子報表、圖檔、或“Jump To”目標定義相對參照位置 • 報表元件 • 使用報表組件庫取得可重複使用的報表元件 • 當報表內使用的元件在伺服器端修改,可獲得通知

  6. 報表設計的新功能 • Expression 語言 • 函數 • Global Variables • 屬性 • 視覺化資料控制項 • 共享元件 • ATOM Data Feeds • 新的資料來源 • Report Builder 3.0

  7. 運算式(Expression)語言 • Lookup 函數 • 彙總後的彙總 • 根據 render 格式的條件運算式 • Overall 頁數 • 讀/寫報表變數 =Lookup(<Field1_Key>, <Field2_Key>, <Field_Return>, "Dataset2") =Avg(Sum(Fields!SalesAmount.Value,"EnglishMonthName"), "CalendarYear") =Variables!MyVariable.SetValue(Now())

  8. 函數Lookup 函數 • 好處 • 在一個資料區域內整合兩個資料集,在資料集之間支援 1:1 和 1:多關係 • Lookup • MultiLookupLookupSet =Lookup(<Field1_Key>, <Field2_Key>, <Field_Return>, "Dataset2") =Join(MultiLookup(Split(<Field1_Key>, ","), <Field2_Key>, <Field_Return>, "Dataset2"), ", ") =Join(LookupSet(<Field1_Key>, <Field2_Key>, <Field_Return>, "Dataset2"), ", ")

  9. 函數彙總函數 • 好處 • 在一句運算式內可以巢狀使用彙總函數 • 以彙總後的結果排序 • 限制 • 無法彙總 Aggregate、RunningValue 或 Previous 等函數 • 範例 =Avg(Sum(Fields!SalesAmount.Value,"EnglishMonthName"))

  10. 設計(Layout)新增功能 • 標頁碼 • 資料對齊 • 文字方向

  11. 內建欄位(Global Variables)RenderFormat • 好處 • 使用 render 格式依條件設定屬性值 • 設定屬性時,可排除具互動能力的 renderers • 用法 • Globals!RenderFormat.Name • Globals!RenderFormat.IsInteractive

  12. 內建欄位頁數 • 好處 • 在分組重置報表頁數後依然可以維繫總頁數 • 限制 • 只能用在頁首/尾 • 用法 • Globals!OverallPageNumber • Globals!OverallTotalPages 頁尾運算式 HTML Footer Excel Footer

  13. 屬性PageBreak屬性 • 好處 • 設定條件式跳頁(Disabled) • 群組跳頁時頁碼歸零(ResetPageNumber) • 設定頁名到 Excel 工作表(PageName) • 範例 • 搭配 RenderFormat • 使用,依轉譯延伸模組 • 管理跳頁

  14. 屬性DomainScope • 好處 • 當空缺出現時,仍可以跨群組對齊 Tablix2 橫跨整個資料範圍內為遺失的資料保留位置

  15. 屬性WritingMode • 好處 • 垂直地從下到上呈現文字 • 限制 • 只能用在文字方塊、小計、tile, 和圖例(legend)等報表項目

  16. 新的資料來源 • SharePoint Lists • 資料來源設定 • 連接類型:Microsoft SharePoint List • 連接字串:URL of site containing list • Report Designer 支援 • Report Designer (Business Intelligence Development Studio) • Report Builder 3.0 • SharePoint 支援 • Windows SharePoint Services 3.0 更新的版本 • Microsoft Office SharePoint Server 2007 • Office SharePoint Server 2010 • 限制 • 只支援單一 list • 不支援在 list內的目錄 • SQLAzure • SQL Server Parallel Data Warehouse

  17. SSRS 資料視覺化 新 !

  18. 視覺化資料 • 資料橫條(Data bar) • 走勢圖(Sparkline) • 指標(Indicator) • 地圖(Map)

  19. 地圖(Map)控制項 • 可以包含一個以上的… • Point Layers (城市、客戶) • Line Layers (路徑、道路) • Polygon Layers (國家、省) • Tile Layers (以 Bing™ Maps 為底) • 支援 ESRI shape files 和SQL spatial • 透過大小和顏色呈現分析資料 • 可以透過精靈建置

  20. 地圖(Map)控制項 Polygon Layer Map Legends 分析性資料 Bubble w/size Rule Color Rule

  21. 地圖(Map)控制項 Point Layer SQL Spatial 查詢 Polygon Layer Tile Layer SQL Spatial 查詢

  22. 走勢圖(Sparkline)和資料橫條(Data Bar) • 走勢圖 • “Data intense, word-sized graphics” – Tufte • 軸自動對齊,所有的圖可以有相同的資料點 • 資料橫條 • 在一個格子內呈現單一值 • 自動判讀最小和最大值,但也可以手動設定 走勢圖 資料橫條

  23. 指標(Indicator) • 透過 Icons表現值、目標、趨勢的狀態 • 報表設計者可以自行建立一組圖案,或是使用既有的 • 可以依照值設定顏色、圖案、大小 • 支援同組成員間彼此自動比較 • 量測軌可以加入指標 指標

  24. 元件化報表 • 發佈報表內可重用的項目到目錄 • 使用者設計想要的檢視時,可以mix & mash 不同的報表項目 • 報表設計者可以將”資料集”&“報表項目”視為building blocks • 使用者可檢測更新

  25. 加入元件到報表 • 透過搜尋功能尋找伺服器上的元件 • 定義搜尋的條件範圍 • 發佈元件時,可透過小圖視覺化地選擇元件 • 報表元件的相依項目會自動加入

  26. 共享元件 • 共享資料集 • 報表元件 • ATOM data feeds

  27. 建立 Report Designer 新選項 Report Builder 3.0 新圖示– Report Data pane

  28. 部署 Report Designer Report Builder 3.0 File | Save As 部署到特定的位置 專案屬性: OverwriteDatasets和TargetDatasetFolder

  29. 共用資料集(Shared Dataset) • 利用新的 .rsd檔案類型,在報表間共享查詢(queries) • 在Report Builder 和 BIDS建立 • 可儲存/部署到Report Server • Report Server 新的類別項目 • 讓查詢語法受 Report Server 管理 • 報表和報表元件可參照共用資料集 • 傳遞參數 • 加入自己的過濾條件和計算 • 報表設計者不需要了解如何設計查詢 • DBA 可以設計高效能的查詢

  30. 管理 • 設定屬性 • 名稱 • Visibility in tile view • 查詢逾時 • 改變資料源 • 檢視相依 • 定義快取、快取過期、快取更新週期 • 安全

  31. 共用資料集(Shared Dataset) • 可以快取資料集的查詢結果 • 在設計與檢視時執行速度更快 • 可用在長時間執行但不常變更內容的查詢 • 可以設定快取的 policies • 可以保護資料源避免被查詢拖累 • 可以設定更新快取資料的週期 • 不用再為快取資料排程寄發 • NULL訂閱

  32. RS 的可重用性 元件 共用資料集 (Shared Datasets) 共用資料源(Shared Datasource)‘連接定義’ 資料來源

  33. SSRS Atom Renderer • 以Atom格式輸出報表資料 • SQL Server Data Services 和 SharePoint 2010 lists 以相同格式輸出資料 • 每個資料區域都有一個以上的 data feeds • 目標:讓了解Atom feeds的前端應用程式 (如:PowerPivot) 可以使用 SSRS 的資料 • 另一個使用已存在報表內的資料之方式 • 避免前端程式需要安裝來源資料的特殊 Driver • 將安控建立在報表層

  34. 如何提供 Atom feed 這張報表內有三個 data feeds 兩個Tablix一個 Chart. Chart、Tablix、 Gauge 和Map,等資料區域可以提供 data feeds 1 2 3

  35. 大綱 • 報表設計的新功能 • 存取報表的新功能 • 管理報表的新功能 • 開發者的新功能

  36. 存取報表的新功能 • 報表管理員 • Report Viewer

  37. 大綱 • 報表設計的新功能 • 存取報表的新功能 • 管理報表的新功能 • 開發者的新功能

  38. 管理報表的新功能 • 更新快取 • 更新快取的資料集,讓報表可以執行更快 • 整合 SharePoint • 支援不同存取路徑(從網際網路或區域網路)存取報表時,不同身分帳號間的對應 • 可以使用 RS.exe 工具程式 • 透過 SharePoint Unified Logging Service 可以儲存對報表服務的呼叫 • RDL sandboxing • 隔絕對報表伺服器的存取 • 支援 hosted services 環境

  39. 大綱 • 報表設計的新功能 • 存取報表的新功能 • 管理報表的新功能 • 開發者的新功能

  40. 開發者的新功能 • AJAX ReportViewer 控制項l • 可透過 JavaScript API 客製化 • Content update internally using ASP.NET AJAX • 支援 AJAX UpdatePanel • 更佳的瀏覽器支援 – IE 6、IE 7、IE 8、Firefox 3.5,和 Safari 4.0 • ReportService2010 • 新的管理用 Web Services 端點 • native 或 integrated 兩種模式的存取類別合併 • ReportService2005 和 ReportService2006 將過期 • 支援 SharePoint user token • 傳遞 SharePoint user token 到 data extension • 讓 Reporting Services 可僅針對授權使用者的存取範圍動作

  41. Web Services 存取 • 用於管理的 Web Services 存取 • ReportService2010 • Reporting Services 2008 R2新的 Web Services 存取點 • 同時支援 native 和 integrated 兩種模式的存取 • report server 物件管理 • 新的類別支援新的功能 • CacheRefreshPlan和CacheRefreshPlanState • ItemHistorySnapshot, ItemParameter, ItemReference, 和ItemReferenceData • 用於執行報表的 Web Services 存取 • ReportExecution2005 • 沿用舊的,同時支援 native 和 integrated 兩種模式的存取 • 依照不同的模式,WSDL 取得位置不同 • http://<servername>/ReportServer/ReportExecution2005.asmx?wsdl • http://<servername>/<sitename>/_vti_bin/ReportServer/ReportExecution2005.asmx?wsdl

  42. 參考資源 • Lookup Function • http://msdn.microsoft.com/en-us/library/ee210575(SQL.105).aspx • LookupSet Function • http://msdn.microsoft.com/en-us/library/ee210576(SQL.105).aspx • MultiLookup Function • http://msdn.microsoft.com/en-us/library/ee210583(SQL.105).aspx • Aggregate Functions Reference • http://msdn.microsoft.com/en-us/library/dd255275(SQL.105).aspx • Understanding Pagination in Reporting Services • http://msdn.microsoft.com/en-us/library/bb677374(SQL.105).aspx • Sparklines and Data Bars • http://msdn.microsoft.com/en-us/library/ee636365(SQL.105).aspx • Working with Indicator Data Regions • http://msdn.microsoft.com/en-us/library/ee635901(SQL.105).aspx • SQL Server Reporting Services Team Blog http://blogs.msdn.com/sqlrsteamblog/default.aspx

  43. 參考資源 • SQL Server 2008 R2 Books Online: What's New (Reporting Services) • http://msdn.microsoft.com/en-us/library/ms170438(SQL.105).aspx

  44. Q&A

More Related