Nielsen c73.tex V4 - 07/21/2009 3:59pm Page 1552 Part X Business Intelligence FIGURE 73-10 Matrix item configured to group by Category and Subcategory on rows, plus Year and Quarter on columns. The drop-down is also a convenient way to access the Group Properties dialog, shown in Figure 73-11, to control the details of a grouping. While the ability to group data seems simple, the effect on report presentation can be stunning. Each of the tabs in the Group Properties dialog provides control over a different aspect of the group: ■ General: Allows the entry of a meaningful group name, and the definition of a group based on one or more fields or expressions. Each group exists in the context of its parent, so only specify what should define a ‘‘section’’ at the current level. Best Practice T o simplify writing expressions in a table or matrix, it is important to provide a name for each group. 1552 www.getcoolebook.com Nielsen c73.tex V4 - 07/21/2009 3:59pm Page 1553 Authoring Reports with Reporting Services 73 ■ Page Breaks: Specify whether page breaks should appear between, before, or after the group. ■ Sorting: The order in which unique group values appear can be adjusted based on the group values themselves, other fields, or even an expression. ■ Visibility: When the report executes, a group can be set to show itself, to be hidden (e.g., detail remains hidden until toggled on by users), or to be visible based on an expression (e.g., users select show/hide detail via a report parameter). Specify the report item that toggles visibility here when user control over specific sections is desired. ■ Filters: Define expressions to limit the values available in the group. ■ Variables: Group variables are evaluated when each new group value is encountered, and not evaluated again until the group value changes. The variable can be referenced in the current or child group expressions via the syntax Variables!MyVar.Value (for the group variable MyVar). ■ Advanced: Specify the field or expression that will appear in the document map for this group. A document map will appear as different types of table-of-contents features depending on the output format of the rendered report (PDF, Excel, or Word). Recursive parent provides a way to display self-referential datasets, such as an employee list that refers to other rows as the manager. FIGURE 73-11 The Group Properties dialog manages the behavior of Tablix groups. 1553 www.getcoolebook.com Nielsen c73.tex V4 - 07/21/2009 3:59pm Page 1554 Part X Business Intelligence A Matrix report item, such as the one shown in Figure 73-10, contains only groups and does not display detailed data. This is why all values are reported using aggregate functions, such as the Sum(Sales) shown in the figure. Table and List items do display detailed data (one row on the report for each row in the dataset), which they accomplish by including a special group named Details by default, with no group expression. Implementing the detail level in this way enables details to be included or excluded from any Tablix by simply adding or removing the Details group. The most intuitive way to use groups together is in a hierarchy. For example, countries are the parent group of regions, regions are the parent group of cities, and so on. Reporting Services also uses the concept of Adjacent groups, which are presented one after the other. Adjacent groups are often used in conjunction with filters at the group level. For example, filters could be defined to show products grossing in the top 10% for the current quarter in one group and the bottom 10% for another group. If these two were arranged as Adjacent groups as children of the Product category, then the report would list only the outliers in each category. Setting the sort order for a Tablix Because sort order can be specified at both the Tablix and group level, it is important to understand that group sort definitions override Tablix definitions. This is in keeping with the Reporting Services theme of child property settings overriding the parent settings. Interactive sorting can also be enabled in a variety of ways. Traditionally, this has been imple- mented by adding sort arrows to the column header of a table. Pressing the arrows on the rendered report causes the report to re-sort as desired. While column headers are the normal place to enable sorting, there are no real restrictions regarding how interactive sorting is enabled, and it can be used for detail rows, groups, or various combinations. For example, follow these steps to enable interactive sorting of the Category column on the ProductList report described earlier in this chapter: 1. Right-click on the Category column header textbox, and choose Text Box Properties. 2. Select the Interactive Sort tab. 3. Check ‘‘Enable interactive sort on this text box’’ and ‘‘Detail rows.’’ Choose [Category] for the ‘‘Sort by’’ option. 4. Select OK to apply the changes. When the report is rendered, users can now re-sort categories using the sort arrows. This process can easily be repeated for the Subcategory and Product columns. Formatting tables with groups The ways in which groups can be used to enhance reports are endless, but this example demonstrates a simple way to enhance the ProductList report shown in Figures 73-8 and 73-9. At this point, the earlier example has been enhanced by adding List Price as an additional table column. Begin by deleting the two left columns, which currently contain Category and Subcategory. Then drag Category and Subcategory fields from the Report Data pane onto the Row Groups pane to achieve the order shown in Figure 73-12. 1554 www.getcoolebook.com Nielsen c73.tex V4 - 07/21/2009 3:59pm Page 1555 Authoring Reports with Reporting Services 73 FIGURE 73-12 The ProductList report design with groups defined for category and subcategory Switch to the preview tab and note that with groups defined, the category and subcategory render only when necessary, instead of being repeated for every row as they were when part of the Details group. This cleans up the presentation substantially; however, also note that the second and subsequent pages do not display column headers — this will definitely hurt the report’s readability. Repeating headers on each page requires that a true header row be added to the report. The procedure to do this is a bit clunky, but very fast once practiced: 1. Drag the Size field (it could be any field) from the Report Data pane to the Column Groups pane. This causes a true header row to be added above the table. 2. Use the drop-down to immediately delete the new group. When prompted by the pop- up, choose the ‘‘Delete group only’’ option, which removes the group but leaves the new header row. 3. The new row will have several columns merged together at the right side of the table. Right-click in the large cell and choose Split Cells. 4. Copy the text labels from the old header row to the new one. 5. Delete the old header row by right-clicking on the row handle and choosing Delete Rows. 6. Right-click on a row or column header and choose Tablix Properties. Check the ‘‘Repeat header rows on each page’’ option. 1555 www.getcoolebook.com Nielsen c73.tex V4 - 07/21/2009 3:59pm Page 1556 Part X Business Intelligence The preview tab now shows both suppressed duplicates from the r ow groupings and column headers that repeat on each page (see Figure 73-13). FIGURE 73-13 The ProductList report preview with both groups defined and repeating column headers Illustrating data with charts and gauges Reporting Services 2008 has greatly enhanced graphics to present report data. Charts show proportion, trends, and comparisons of series of data. Drag a chart onto the design surface and click to select the item. Three areas appear ready for data fields to be dragged onto them: ■ Series: This is the field that separates the data into groups that appear in the legend. For example, Year is the Series field in Figure 73-14. ■ Category: This is the field that subdivides a series into distinct bars or points on a line. For example, Product Category is the Category field in Figure 73-14. ■ Data: These are the actual values to be charted. 1556 www.getcoolebook.com Nielsen c73.tex V4 - 07/21/2009 3:59pm Page 1557 Authoring Reports with Reporting Services 73 FIGURE 73-14 Sample chart of sales comparisons with scale breaks enabled on the vertical axis Fields can be dragged directly from the Report Data pane where the dataset is defined to a chart. Titles, placement, and many formatting details can now be set by directly typing on or moving items within the chart. An exhaustive set of additional properties is available via the right-click menu to control nearly every detail of the chart. New in 2008 G auges are new in Reporting Services 2008. They provide an eye-catching way to call out key metrics in a report, such as plan vs. budget. A gauge is conceptually a much simpler control. It displays how far a value falls on a scale, like a gas gauge or thermometer. The dataset that drives the gauge need only provide a single value (or for some 1557 www.getcoolebook.com Nielsen c73.tex V4 - 07/21/2009 3:59pm Page 1558 Part X Business Intelligence gauges a few), and, optionally, the minimum and maximum values for the scale. For example, a gauge could display how all salespeople are performing against their sales quota. Drag a gauge onto the design surface and select it to see the data handle. Drop the field from the dataset to be displayed into this handle. Then right-click to access the scale properties to enter the minimum and maximum scale values, or choose the dataset fields to associate them with. Summary Reporting Services delivers abundant features that enable report authors and developers to empower business decision-makers by providing access to interactive reports. The Reporting Services Project in the Business Intelligence Development Studio contains a rich set of tools to make report authoring possible. The 2008 release removes many of the barriers that developers have encountered in previous versions. For authors who have previously used other reporting products, the switch from writing c ode to accom- plish advanced tasks to the expressions in properties paradigm of Reporting Services can be challeng- ing at times, but well worth the investment. Development is faster, the paradigm is more flexible, and changing an existing report is much easier. Even the best development environment does not guarantee good reports. Like any development effort, creating useful reports requires talking to prospective users to understand the questions they are trying to answer, and prototyping different reports to get feedback on the effectiveness of different presenta- tions. Push the boundaries in prototypes because most users will be unfamiliar with the power available in Reporting Services. 1558 www.getcoolebook.com Nielsen c74.tex V4 - 07/21/2009 4:10pm Page 1559 Administering Reporting Services IN THIS CHAPTER Structure of the report server Report deployment options Security model and guidelines General server configuration Leveraging existing development with linked reports User and data-driven subscriptions O nce reports have been developed in Reporting Services, they must be delivered to be of value. Certainly most users won’t be interested in loading up the development environment to view the latest sales report! The Reporting Services server addresses this need. The server can run on the same hardware as the relational database but need not if system load requires scale-out. Installing the server creates one windows service and installs two relational databases: one that contains deployed report definitions and other metadata, and a second for temporary objects used in processing. After instal- lation, be sure to visit the Reporting Services Configuration Manager to adjust settings and back up the encryption keys and save them in a safe place. Keeping all the metadata in the ReportServer database makes it simple to back up, but without the encryption key a restore will be difficult. All access to the Reporting Services service happens via a Web Service, which enables reports to be uploaded and managed, security settings modified, and so on. The Web Service can be accessed in several ways: ■ Business Intelligence Development Studio will deploy reports to the Web Service. ■ Applications and browsers can explore and render reports by referencing aURL. ■ Programmatically, custom applications can access all of the server’s features. SharePoint has made good use of these capabilities by adding Reporting Services web parts and integration. ■ The Report Manager, an ASP.NET application installed with Reporting Services, provides interactive access to the server. ■ SQL Server Management Studio can connect to Reporting Services for managing server properties and roles. 1559 www.getcoolebook.com Nielsen c74.tex V4 - 07/21/2009 4:10pm Page 1560 Part X Business Intelligence New in 2008 R eporting Services no longer requires IIS to be installed. It now uses the HTTP listener (HTTP.SYS) to process requests to the Web Service. This implementation enables IIS to be omitted from Reporting Services servers entirely, but does not interfere with IIS implementations when run on the same server. The role of tools in managing Reporting S ervices has changed in 2008 to support the enhanced architecture and SharePoint integration. SQL Server Management Studio no longer manages report server content or subscriptions. The Report Manager application provides the tools required to administer the report server and deploy items, including reports, shared data sources, and data models. The Report Manager also provides the interface for users to access, manage, and execute reports. The default URL for the Report Manager is http://localhost/reports. Figure 74-1 shows the Report Manager application on its default page. FIGURE 74-1 The Report Manager comes with Reporting Services. It provides an interactive interface for both users and administrators. This chapter describes the tools and methods to administer the report server, beginning with deploying reports onto the server. 1560 www.getcoolebook.com Nielsen c74.tex V4 - 07/21/2009 4:10pm Page 1561 Administering Reporting Services 74 Deploying Reporting Services Reports This section explores the options and strategies to deploy the reports to the report server. Deploying directly from the development environment, Business Intelligence Development Studio (BIDS) is the simplest method for the developer, but it may not always be possible or desirable depending upon configuration and security constraints. Deploying reports using BIDS Deploying reports using BIDS requires some basic configuration of the Reporting Services project. Once configured, reports (and other resources such as data sources and images) can be deployed individually or the entire project can be deployed. To configure the deployment properties for a Reporting Services project, open the project’s property page by right-clicking on the Reporting Services project and selecting Properties. Figure 74-2 shows the property page for a Reporting Services project, and Table 74-1 summarizes the deployment properties available for a Reporting Services project. FIGURE 74-2 Use t he settings on the property page of a Reporting Services project to configure the deployment options. Deploying a single report or data source Once the deployment properties are configured for a Reporting Services project, a report or data source can be deployed by simply right-clicking on the item and selecting Deploy in Solution Explorer. The sta- tus bar at the bottom of Visual Studio indicates the deployment’s progress. During deployment, progress and any errors appear in the output window. 1561 www.getcoolebook.com . server. ■ SQL Server Management Studio can connect to Reporting Services for managing server properties and roles. 1559 www.getcoolebook.com Nielsen c74.tex V4 - 07/21/2009 4:10pm Page 1560 Part. integration. SQL Server Management Studio no longer manages report server content or subscriptions. The Report Manager application provides the tools required to administer the report server and. Reporting Services servers entirely, but does not interfere with IIS implementations when run on the same server. The role of tools in managing Reporting S ervices has changed in 2008 to support