Databases Reference
In-Depth Information
Relationships in the Data Source View are extremely important in a Report Model. These relationships
will later be used to create roles within the Report Model. A role allows a user to navigate from one sec-
tion of the Report Model to another and tells the semantic query processor how to retrieve data. Roles
are also used to implement a feature of Report Builder called Infinite Drill Through. This feature allows
the report developer to create a single report, and then Reporting Services will create reports at runtime
when users click on related items. For example, a user could build a report that contains Sales Amount
for each of the product categories. Once the report is deployed, a user can click on a product category
and see sales information for each of the related subcategories.
Using Named Queries in Data Source Views
Another major feature of the Data Source View is its ability to use named queries. When a table or view
is added to a Data Source View, a reference to that table or view is created. If the table or view schema
changes, items bound to the schema can break. It is not uncommon in applications to have column names
or table names change during the life of the application. So, to alleviate this issue, queries instead of
direct references can be created within the Data Source View.
Queries offer flexibility on top of the Data Source View. If a column name changes in the underlying
database schema, the query can be updated to reflect this change. Column names can be aliased and
breaking changes can be avoided. It can be considered best practice to change your Data Source View
tables to Named Queries. There is no negative performance impact, so the flexibility you gain is well
worth it. Figures 8-14 and 8-15 illustrate replacing the FactResellerSales table with a new named query
by right-clicking on the table in the Data Source View.
Figure 8-14
Search WWH ::




Custom Search