Pro SQL Server 2012 Reporting Services

(sharon) #1

CHAPTER 13  CREATING REPORTS USING REPORT BUILDER 1.0, 2.0, AND 3.0


Figure 13-7. Related tables in the Pro_SSRS_2008R2 data source

You could add all the tables from the list of required tables for the patient census reports you are
going to create; however, knowing that you will have too many unnecessary fields to work with, simply
select Next and then Finish to close the wizard without including any objects. This will create the Pro
SSRS 2008R2 data source view with no tables defined. Why, you may ask, did you not select any
relational objects, since this seems like a crazy way to start? The reason is that you will add your own
single object, called a named query, which is like a view in a SQL Server database. It is an object derived
from a query of other objects. Assuming you had chosen one or more tables, you would have graphically
defined the relationships for the tables based on primary keys, if they existed, or by using related column
ID values and these tables would become the source for the report model. The end result is the same,
whether you use real table objects with relationships or you use named query tables that contain only
the fields you want. The difference is that this way you gain the benefit of one simple and concise table,
instead of using many tables with the potential downside of adding more data than are needed for the
model.
Once you have created the data source view, which defaults to a name of Pro SSRS 2008R2 based on
the data source, you can double-click to open it in the design environment. It will appear empty, as it
should. You can add the source query, or more accurately, the named query, by clicking the New Named
Query button on the toolbar, as shown in Figure 13-8.
Free download pdf