Udostępnij za pośrednictwem


Exploring the Primary Entity and Its Related Data (Report Builder)

When you drag a field, a set of fields, or the entity itself to the design area, the entity becomes the primary entity. The primary entity provides the context for the report. For example, suppose you want to create a report that shows how much income your company has generated in the past month. After reviewing your data source, you select the Ship Date and Sum Total Due fields from the Sales Order entity and drag them to the design area. The Sales Order entity becomes the primary entity. The primary entity provides a context for the report. This context provides Report Builder with the information that it needs to retrieve the data stored in the underlying database when you run the report.

Now that the report has been placed in a context, Report Builder no longer displays entities that are not related to the primary entity. For example, when you add the Ship Date and Sum Total Due fields to the design area, only those entities that relate to Sales Order are listed in the Entities area of the Explorer pane. Sales Order appears in bold and the related entities, such as Sales, Customer, Sales Person, and Territory, are nested beneath the Sales Order entity. To move between the primary entity and its related entities, click the entities. When you drag fields or entities to the design area, the entity names appear in bold.

Changing the Primary Entity

Based on the fields and entities that you drag to the design area, the primary entity might change. Primary entity changes occur when you drag a field that contains a single value from a related entity and drop it to the right of the primary entity fields in the design area. Using the previous example, suppose you add the Sales ID entity from the Sale entity to the design area. When you add this field, the primary entity changes from Sales Order to Sale. This change in primary entities allows you to see all the information about the Sale entity that you might want to add to your report. The Sale entity provides the new context for the report.

Relationships Between Entities

Entities can have a to-one relationship or a to-many relationship with other entities within a source of data. For example, there is a to-one relationship between the Product and Product Model entities. For every product there is a product model. The relationship between the Customer and Sales Orders entities is an example of a to-many relationship. For every customer there can be multiple sales orders. Related entities, known as roles, are indented below the selected entity. This allows you to navigate to other entities that are related to the selected entity.

See Also

Concepts

Creating a Report (Report Builder)
Working with Entities and Folders (Report Builder)
Working with Fields (Report Builder)

Help and Information

Getting SQL Server 2005 Assistance

Change History

Release History

14 April 2006

Revised content:
  • Revised the Relationships Between Entities section.