- Microsoft Dynamics AX 2012 Reporting Cookbook
- Kamalakannan Elangovan
- 417字
- 2021-08-06 16:40:50
Creating a new layout template
Chapter 1, Understanding and Creating Simple SSRS Reports, discussed how using templates can standardize the report. Dynamics AX offers standard templates but there is also the capability to add a new template. This recipe will show how to create a custom layout template that can be used to standardize report aesthetics such font, size, color, and so on.
How to do it…
A new layout template can be created as follows:
- Open Visual Studio and navigate to View | Application Explorer. This displays the entire AOT as in the AX environment in Visual Studio.
- Navigate to the
Sharedlibrary
project under Visual Studio Projects | Dynamics AX Model Projects. Right-click and select Edit. - This project contains all the predefined templates. Right-click on the project and select Add | Table style template (Choose the template based on the data region such as table, list, and so on.).
- There is no inheritance concept among templates, each template is independent and must define the entire formatting.
- Double-click on the template to open the editor and rename it as
PktTableStyleFancyTemplate
. - In the current report design, there are two levels of groupings defined, CustGroup followed by AccountNum.
- To set the fonts for both the levels, the GroupLevel1Style and GroupLevel2Style nodes must be modified.
- Expand GroupLevel1Style and double-click on the FieldCaptionStyle node to open the following form (Alternatively open the property window):
- Set the following properties for both the nodes:
- Repeat the same for DetailRowStyle | FieldValueStyle
- Templates don't need deployment and they are available once they are created. Switch to the report node and select the table data region CustTransTable.
- The drop-down will have the new template that was added, and set that as the template:
- Right-click and preview to see that the fonts are different and the group nodes have a dashed line.
How it works…
Layout templates define the general layout settings such as company name, date, page number, and formatting for a report. The style templates are applicable for data regions and depending on the data region the type of template also varies. AX offers a set of predefined report layout and style templates.
These templates bring in the ability to present uniform look and feel across reports. The elements in a template are fixed depending on the type, so elements cannot be added or removed but can only have different formatting. The templates are useful only in case of auto design, while in the case of precision design they are not used.
- 審計全流程技術操作實務指南
- Microsoft Dynamics GP 2016 Cookbook
- VMware vCloud Director Essentials
- 財務審計實務指南
- 中國政府統計問題研究
- Salesforce Essentials for Administrators
- vSphere Design Best Practices
- Programming Microsoft Dynamics NAV(Fifth Edition)
- 行政單位經濟責任審計實務指南
- 2017年度注冊會計師全國統一考試專用教材(圖解版):審計
- PMP備考寶典:路晨帶你去通關
- Big Data Analytics with R and Hadoop
- 計量經濟學理論與應用:基于Eviews的應用分析
- Microsoft Dynamics CRM 2016 Customization(Second Edition)
- 2014年注冊會計師(CPA)全國統考專用輔導教材系列:審計(名師解讀版)