Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

cdn.s3techtraining.com
from cdn.s3techtraining.com More from this publisher
17.06.2013 Views

Chapter 17: Reporting for Duty, Sir! A Look At Reporting Services Play around with the report some, and you’ll find that you can easily re-sort the result in other ways. Note that we also could have defined a default sort order — for example, sorting those with the soonest due date — by setting it in the Sort and Group dialog (next to Filter in the toolbar). A Few Last Words on Report Models Report Models are certainly not the catch-all, end-all of reporting. It is, however, a very cool feature in the sense that you can expose data to your end users in a somewhat controlled fashion (they don’t see any more than you put in the data source, and access to the data source is secured such that you can control which users see which data sources), but still allow them to create specific reports of their own. Report models offer a very nice option for “quick and dirty” reports. Finally, keep in mind that we generated only one very simple report for just the most simplistic of layouts. Report Models also allow for basic graphing and matrix reporting as well. Report Ser ver Projects 536 Report Models can be considered to be “scratching the surface” of things — Reporting Services has much more flexibility than that. (Indeed, I’m sure there are entire books around just on Reporting Services; there is that much to it.) In addition to what we’ve already seen, the Business Intelligence Development Studio will allow you to create Report Server Projects. As I mentioned before, there are entire books around just this subject, so the approach we’re going to take here is to give you something of a little taste of the possibilities through another simple example. (Indeed, we’re just going to do the same example using the project method.) At this point, you should be fairly comfortable with several of the concepts we’re going to use here, so I’ll spare you the copious screenshots such as those you’ve already endured, and get to the nitty-gritty of what needs to be done to get us up to the point of new stuff: 1. Open a new project using the Report Server Project template in the Business Intelligence Development Studio (note that this is different from the Report Model project we used earlier). 2. Create a new data source against our AdventureWorks2008 database. (Right-click the Shared Data Source folder and fill in the dialog — use the Edit button if you want the helpful dialog to build your connection string, or you can just copy the connection string from earlier in the chapter). Note that, to deploy this new data source, you’re going to need to name it something other than the name you used earlier in the chapter (assuming you did that example). 3. Right-click the Reports folder and choose Add New Report. This takes you to the Report Wizard — click Next to move on to the Data Source Selection screen. Select the data source you just created. Then click Next. This should bring you to the query dialog shown in Figure 17-25. I have, of course, added the query in myself; this one should roughly duplicate the report we built in the Report Model section including the filter to just unshipped orders. I could have also entered the query builder and, while in the builder, even executed the query to verify that my query returned the expected data. Note that we also could have executed a stored procedure at this point or gone directly against a specific table.

Chapter 17: Reporting for Duty, Sir! A Look At Reporting Services Figure 17-25 Click next and accept the Tabular report type, and we come to the Table Design Wizard shown in Figure 17-26. Figure 17-26 537

Chapter 17: Reporting for Duty, Sir! A Look At Reporting Services<br />

Figure 17-25<br />

Click next and accept the Tabular report type, and we come to the Table Design Wizard shown in<br />

Figure 17-26.<br />

Figure 17-26<br />

537

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!