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

  1. In the Tree view, select the Sales Person entity.

  2. In the Properties window, select DefaultDetailAttributes.

  3. To edit the property, click the ellipsis () button.

  4. In the Members list of the AttributeReference Collection Editor dialog box, select Commission Pct, and then click Remove.

  5. Click Add.

    The Default Detail Attributes dialog box appears.

  6. In the Entities list, select the Employee entity and then select the Contact entity.

  7. In the Fields list, select First Name, Middle Name, and Last Name, and then click OK.

  8. 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.

  9. 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

  1. Launch Report Builder.

  2. In the Getting Started pane, select the AdventureWorks model, and then click OK.

  3. To see the Product Details folder, scroll down the list of entities.

    This folder was created in Lesson 3.

  4. 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.

  5. In the Entities list, find the Sales Orders and Sales entities.

    These entities were renamed in Lesson 4.

  6. 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.

  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.

  8. To view the results of your report, click Run Report.

  9. To return to the design area, click Design Report.

  10. On the File menu, click New.

  11. When the Getting Started pane appears, select the AdventureWorks model and then click OK.

  12. When prompted to save your report, click No.

    You do not need to save this report for future tutorial lessons.

  13. In the Entities list, navigate to the Product entity.

  14. Drag the Product entity to the design area.

    In the Entities list, notice that the Product Subcategory entity is listed below the Product entity.

  15. 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.

  16. 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.

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.

Community Additions