Lesson 8: Specifying Default Detail Attributes
Default detail attributes are the fields that identify a unique instance of the entity plus other fields that Report Builder users might find useful when creating their reports. When the user drags an entity to the design area, the default detail attributes appear. For example, when the Product entity is added to the design area, the following fields appear: Name, Product Number, Weight, Size, Color, and Standard Cost. Name uniquely identifies each instance of product but Product Number, Weight, Size, Color, and Standard Cost are additional fields about the product that a user might want to see when creating reports about products. Identifying attributes are the one or two fields that identify each instance of the entity as a unique item. For example, the Name field uniquely identifies each product.
In this lesson, you will specify the default detail attributes for an entity, and then you will redeploy the model and see the report model changes in Report Builder.
To specify default detail attributes
In the Tree view, select the Sales Person entity.
In the Properties window, select DefaultDetailAttributes.
To edit the property, click the ellipsis (…) button.
In the Members list of the AttributeReference Collection Editor dialog box, select Commission Pct, and then click Remove.
Click Add.
The Default Detail Attributes dialog box appears.
In the Entities list, select the Employee entity and then select the Contact entity.
In the Fields list, select First Name, Middle Name, and Last Name, and then click OK.
Click OK again.
In the Properties window, note that the DefaultDetailAttributes property indicates that there are four attributes. When the user adds the Sales Person entity to their report, the sales person's National ID Number, and first, middle and last names are added.
On the File menu, click Save All.
To deploy the report model
- On the Build menu, click Deploy AdventureWorks Model.
To view report model changes in Report Builder
Launch Report Builder.
In the Getting Started pane, select the AdventureWorks model, and then click OK.
To see the Product Details folder, scroll down the list of entities.
This folder was created in Lesson 3.
To see the contents of the Product Details folder, click Product Details.
The entities in this folder were added to the folder in Lesson 3.
In the Entities list, find the Sales Orders and Sales entities.
These entities were renamed in Lesson 4.
Select the Sales Orders entity, and then drag the Sum Total Due field to the design area.
This field was renamed in Lesson 4 and formatted in Lesson 7.
Drag the Sales Person entity to left of the Sum Total Due field.
Notice that the National ID Number, First Name, Middle Name, and Last Name fields are added to the report. These are the default detail attributes that you added to the entity in this lesson. This is the same report that you created earlier except that now your new model changes are displayed.
To view the results of your report, click Run Report.
To return to the design area, click Design Report.
On the File menu, click New.
When the Getting Started pane appears, select the AdventureWorks model and then click OK.
When prompted to save your report, click No.
You do not need to save this report for future tutorial lessons.
In the Entities list, navigate to the Product entity.
Drag the Product entity to the design area.
In the Entities list, notice that the Product Subcategory entity is listed below the Product entity.
Select the Product Subcategory entity.
Note the fields within this entity. Also, notice that the Product Category entity is listed below the Product Subcategory entity.
Next, select the Product Category entity.
Note the fields within this entity.
These entities have only one useful field associated with them: their respective Name attributes. It would be helpful to see these fields as attributes of the Product entity rather than have to navigate to each of them individually.
Next Steps
In the next lesson, you will change the properties of an entity so that it is a lookup entity for another entity. See Lesson 9: Specifying a Lookup Entity.
See Also