Model Editor Overview

Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

Model Editor is a tool in Visual Studio that allows you view, create, edit, and delete items within a report model for Microsoft Dynamics AX. Model Editor is the default modeling tool. When you double-click a report in Solution Explorer or Application Explorer, it opens the report in Model Editor. This topic describes the following features:

  • How to use Model Editor with other tools in Visual Studio

  • Keyboard shortcuts in a report model

  • Icons used in a report model

The following illustration shows the InventoryTableOverview report model open in Model Editor.

Model Editor

Model Editor Features

The following table lists some of the features of Model Editor and describes how these features are used.

Feature

Description

Model Editor toolbar

The Model Editor toolbar provides access to common functions in Model Editor, such as

  • Adding the following child elements to the report model:

    • Auto Design

    • Data Method

    • Dataset

    • Image

    • Precision Design

  • Previewing report designs

  • Moving model elements up or down

  • Sorting model elements alphabetically

  • Deleting reports or elements of the report

The toolbar displays at the top of the window. Only the functions that apply to the selected report element are enabled in the toolbar. For example, the Preview functionality is enabled only when you have selected a report design that can be previewed.

Multi-select operations

You can select multiple model elements, adjacent or nonadjacent, by using the SHIFT or CTRL keys.

Drag-and-drop operations using the mouse

You can use the mouse to drag model elements to other locations or create copies of model elements. You can also use drag-and-drop operations to create new model elements based on the selected model element. For example, you can drag a dataset from Application Explorer onto the Designs node to create an auto design for the report that displays the data from the dataset. You can perform these operations in a Model Editor window and between Application Explorer, Solution Explorer, and Model Editor windows. In addition, you can use drag-and-drop operations between multiple instances of Microsoft Visual Studio.

Edit mode for new elements

The name for a new model element is displayed in edit mode so that you can type a name for the model element.

Find as you type

To navigate, you can use "find as you type" by typing a letter on the keyboard. For example, when focused on the root node, typing the letter d will move the focus to the next node in the model element node that starts with the letter d.

Shortcut menus

When you right-click a model element, a shortcut menu is displayed with options specific to the model element. If you use multi-select, only options applicable to all of the selected model elements are available on the shortcut menu.

Reorder model elements

You can change the order of the display of model elements in a node. To reorder model elements, right-click a model element, and then select an option from the Model Editor toolbar, shortcut menu, or keyboard shortcuts such to move model elements up or down in the node.

You can also sort model elements alphabetically by selecting one or more model element in a node, and then click Sort Ascending or Sort Descending on the shortcut menu, or on the Model Editor toolbar.

Undo and Redo operations

You can click Undo and Redo for a change to a model element if the change is not saved to the model store database.

Warning

Changes to parent model elements, such as rename or delete, are immediately saved to the model store database, together with any unsaved changes to child model elements, and cannot be undone.

Icons

For easy identification, each type of model element has an icon.

Working with Model Editor

The Model Editor is the primary development tool that you can use in Visual Studio to create and customize a Microsoft Dynamics AX business application. You can also use the Application Explorer, AX Modeling project, and Solution Explorer together with Model Editor.

Only one parent model element can be opened in each Model Editor. However, you can have multiple Model Editors open and drag-and-drop child model elements between the windows. For example, you can have two SSRS Reports open in two Model Editors, and then drag a Dataset from one Model Editor to a node in the other Model Editor window. You can view more than one Model Editor window at the same time. Right-click the tab bar above the Model Editor toolbar, and then click New Horizontal Tab Group or New Vertical Tab Group to arrange the windows into two or more windows.

Application Explorer

Application Explorer is a read-only view of the parent model elements in the model store database and a source for drag-and-drop operations into Model Editor. In Application Explorer, you can right-click model elements, and then click Edit in New Window to open a model element in Model Editor.

Model Editor displays the model elements from a single parent model element whereas Application Explorer displays all model elements in the model store database.

For more information, see Application Explorer.

Solution Explorer

Solution Explorer contains the files and model elements for one or more AX Modeling projects. After you open an AX Modeling project, you can add parent model elements to the project. You can then double-click, or right-click to open a model element in Model Editor to view or customize child model elements.

Keyboard Shortcuts

The following keyboard actions are supported in Model Editor.

Key

Description

F2

Enables the name of the node to be edited. You can only rename nodes for the elements that have been added to a model. You cannot rename default nodes, such as the Designs node or the Images node.

SHIFT+F10

Opens the shortcut menu.

ALT+ENTER

If the selection has properties, it changes focus to the Properties window where the properties for the selection display.

LEFT ARROW

Collapses the selected node if it is expanded. If the selected node is collapsed, the selection moves the up one level.

RIGHT ARROW

Expands the selected node if it is collapsed. If the selected node is expanded, the selection moves down one level and expands the node.

UP ARROW

Moves the selection to the node that is directly above the current node.

DOWN ARROW

Moves the selection to the node that is directly below the current node.

ALT+UP+ARROW

Moves the selected element up one level in the collection.

ALT+DOWN+ARROW

Moves the selected element down one level in the collection.

ALT+HOME

Moves the selected element to the top of the collection.

ALT+END

Moves the selected element to the bottom of the collection.

ALT+A

Sorts elements in the collection in ascending order.

ALT+Z

Sorts elements in the collection in descending order.

HOME

Moves the selection to the topmost node in the model.

END

Move the selection to the last node in the model.

PAGE UP

Scrolls up one page.

PAGE DOWN

Scrolls down one page.

CTRL+Z

Reverts the last unsaved command.

CTRL+Y

Reverts the last unsaved Undo command.

CTRL+S

Saves the model element to the model store database.

Icons

The following table describes the elements in a report model.

Element

Icon

Description

Report

Report

The report element represents a report definition. A report definition contains a collection of elements such as datasets, parameters, images, and report designs. The elements that define a report are located under the node for the report in a model. For more information, see How to: Add or Delete a Report.

Report Data Source

Report data source

A data source is a source of data for a report dataset. You can use the predefined data source, which connects to the Microsoft Dynamics AX application database. Or, you can define your own data sources. For more information, see How to: Define a Report Data Source.

Dataset

Report dataset

A dataset identifies data that is displayed in a report. Every report must have one or more datasets. For more information, see How to: Define a Report Dataset.

Data Method

Report data method

A data method contains code to retrieve and process data for a report. The code for a data method is written in C# or Visual Basic, depending on which project template is used. For more information, see How to: Define a Data Method in C#.

Data Region

Report data regions

A data region is an area in a report that displays data. Data can be displayed in table, list, matrix, or chart formats. For more information, see How to: Add a Data Region to a Report.

Parameter

Report parameter

A parameter lets you parameterize data for a report. For more information, see How to: Define a Report Parameter.

Filter

Report filter

A filter is used to filter or restrict the data that is displayed in a report. For more information, see How to: Define a Report Filter.

Grouping

Report data grouping

A grouping lets you organize data that displays in a report by grouping fields. For more information, see How to: Define Groupings in a Data Region.

Sorting

Report sort order

A sort lets you control the order in which data displays in a report. For example, you can sort alphabetically by field in ascending or descending order. For more information, see How to: Define a Sorted Data Region.

Image

Report image

An image can be a company logo. Or, you can display images together with the data in a report, which is common in product listings. For more information, see Displaying Images in Reports.

Auto Design

Report auto design

An auto design is a report design that is automatically generated based on the report data. An auto design is created by dragging and dropping, and selecting elements by using Model Editor. For more information, see How to: Create an Auto Design for a Report.

Precision Design

Report precision design

A precision design is a report design that is created by using SQL Report Designer. Precision designs are useful when a very precise layout is required. For more information, see How to: Create a Precision Design for a Report.

Layout Template

Report layout template

A layout template specifies the styles that are applied to the header, footer, and body of a report. One layout template can be applied to many reports. For more information, see How to: Create a Layout or Style Template.

Style Template

Report style templates

A style template specifies the styles that are applied to a data region. When you create a style template, you will notice that there are several types of templates that you can create based on the data region type. A style template can be applied to more than one data region in a report and it can be applied to data regions in more than one report. For more information, see How to: Create a Layout or Style Template.

See also

Creating Reports Overview