ActiveReports 10 Server User Guide
Adding a New Logical Column (Attribute)
ActiveReports 10 Server User Guide > Managing Models > Model Editor Overview > Adding a New Logical Column (Attribute)

You can create and add a new logical column to an entity, or base a new attribute on an existing logical column from the list.

To base a new attribute on a related entity

Follow these steps to select an existing attribute on a related entity.

Base a new attribute on an existing logical column

  1. In the Models list, select the model that you want to edit and then click Edit model button.
  2. In the model editor that appears, in the Entities list on the left, select the entity to which you want to add an attribute.
  3. In the Attributes list on the right, click Add. The Add Attribute wizard appears.

  4. In the Add Attribute wizard, click the Related Entity selection.
  5. In the list of existing attributes that appears, a white triangle indicates that you can expand the node to reveal related attributes. (A black triangle indicates that a node is expanded.)

  6. Select the one that you want to use and click Next.
  7. In the Name and Description boxes that appear, enter the name and description for the new attribute. 
  8. Click Finish. The new attribute appears in the Attributes list.
  9. In the Model Editor toolbar, click the Save & Publish button to save the changes. The new logical column is available to report creators.

To base a new attribute on a database field

Follow these steps to select a database field to use as an attribute.

Base a new attribute on a database field

  1. In the Models list, select the model that you want to edit and then click Edit model button.
  2. In the model editor that appears, in the Entities list on the left, select the entity to which you want to add an attribute.
  3. In the Attributes list on the right, click Add. The Add Attribute wizard appears.

  4. In the Add Attribute wizard, click the Database Field selection.
  5. In the list of existing columns that appears, select the one that you want to use and click Next.
  6. In the Name and Description boxes that appear, enter the name and description for the new attribute. 
  7. Click Finish. The new attribute appears in the Attributes list.
  8. In the Model Editor toolbar, click the Save & Publish button to save the changes. The new logical column is available to report creators.

To create a new logical column (attribute)

Follow these steps to create a new attribute using a SQL expression definition.

Creating a new attribute from an expression

  1. In the Models list, select the model that you want to edit and then click Edit model button.
  2. In the model editor that appears, in the Entities list on the left, select the entity to which you want to add an attribute.
  3. In the Attributes list on the right, click Add. The Add Attribute wizard appears.
  4. In the Add Attribute wizard, click the SQL Expression selection.
  5. In the Name box that appears, enter the name for the new attribute. This value appears in the list of entities for the model.
  6. In the Description box, enter a description that provides users with additional information about the attribute, such as when it is appropriate to use it.
  7. In the Expression Definition box, define the expression for the logical column with a SQL expression that pulls the data that you want.
    Note: The syntax to use for expressions is T-SQL for SQL data sources or PL-SQL for Oracle data sources.
  8. Check your query using the commands above the preview box.
    • Validate verifies the expression and displays any errors it finds in red at the top of the dialog.
    • Preview Schema populates a table with information pulled by the expression (column name, size, data type, and is nullable).
    • Preview Data populates a table with a sampling of the data pulled by the expression.  


  9. Click Finish. The new attribute appears in the Attributes list.
  10. In the Model Editor toolbar, click the Save & Publish button to save the changes. The new logical column is available to report creators.
See Also