How to: Apply a Layout or Style Template (Visual Studio Reporting Tools for Microsoft Dynamics AX)
A layout template defines the general layout and style settings for a report. A style template contains the layout and style settings for a data region that displays in the body of a report. Style templates are specific to a data region type and are applied directly to a data region.
When you define your report designs, you must decide whether to use the predefined layout and style templates for Microsoft Dynamics AX or define your own templates. The predefined layout and style templates are contained in a reporting project called SharedLibrary. To use these templates, you can add the SharedLibrary project to your solution, and then reference it from the project that contains your reports. For a list of the predefined templates, see Predefined Layout and Style Templates (Visual Studio Reporting Tools for Microsoft Dynamics AX). The following procedures explain how to reference the SharedLibrary project and how to apply layout and style templates.
To add a reference to the SharedLibrary project (contains predefined templates)
-
On the File menu, point to Add, and then click Existing Project from Dynamics AX. A dialog box displays.
-
In the dialog box, select SharedLibrary, and then click OK.
The project is added to your solution. In order to reference the predefined layout and style templates from your project, you must add a reference to the SharedLibrary project from your project.
-
To add a reference to the SharedLibrary project, in Solution Explorer right-click the project that contains your reports, and then click Add Reference.
-
In the Add Reference dialog box, click the Projects tab.
-
Select the SharedLibrary project, click Add, and then click OK.
Now that you have added a reference to the SharedLibrary project, you can apply the layout and style templates that are defined within this project. The following procedures explain how to apply layout and style templates.
To apply a layout template to a report
-
In Model Editor, expand the node for the report that you want to work with, and then expand the Designs node.
-
Select the auto design that you want to apply the layout template to.
-
In the Properties window, select a layout template from the drop-down menu for the Layout Template property.
To apply a style template to a data region
-
In Model Editor, select the data region that you want to apply the style template to.
-
In the Properties window, select a style template from the drop-down menu for the Style Template property.