Escolar Documentos
Profissional Documentos
Cultura Documentos
Introduction
A report presents information from a database as a printed document. Use reports to print invoices or complex summaries. All reports in Microsoft Dynamics AX 2009 are located in the AOT, where report elements can be accessed and adjusted. Several tools are designed to help perform adjustment tasks. MorphX helps to design reports that present information by using a graphical tool named the Visual Report Designer. This tool can combine many different design elements into one report, such as: Labels Data from the database Lines Graphics
The Visual Report Designer is located under the reports node in the AOT. The Visual Report Designer will be reviewed first, followed by the two types of report designs Auto Design and Generated Design. Lastly, reusable templates will be examined for both reports and sections. See the Appendix topic, "Case Study".
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
4-1
4-2
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Use this to override the default value and specify the number of columns viewed on the report. By clicking the toggle button again, it returns to the default value.
3. Add a field to the body of the report by right-clicking in the body and selecting New. There are several options available, but for now focus on the option Field from CustTable. 4. Select this option to display the list of fields from the data source.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
4-3
NOTE: Learning best practices means to become aware of all the things to do, and then being able to distinguish which of these can be realistically accomplished.
4-4
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Report Design
A report in the AOT resembles a form. They both contain Methods, Data sources, and Designs. An important difference is that the data source element in reports consists of a query not a table. Microsoft Dynamics AX 2009 enables reports to have designs generated automatically so that the developer does not have to specify a report layout. The design of a report is controlled from the Designs node. Within the Designs node there are two types of design specifications: AutoDesignSpecs GeneratedDesign
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
4-5
NOTE: Instead of using a table in the report datasource, a Query may also be used by dragging and dropping the Query from the AOT to the Report Datasource. Now a Design for MyReport must be created. 1. Right-click the Designs node and select New Report Design. 2. Expand the ReportDesign1 node to reveal the AutoDesignSpecs node. Right-click this node and select Generate Specs From Query. The nodes created under this one correspond to the tables within the query. 3. Add fields to these groups in the design. On the CustTable_Body node, right-click and select the new control Field from CustTable. Drag the AccountNum, Name, and Address fields onto this node. 4. Repeat this process for the CustTrans_Body node by using the new control Field from CustTrans to add TransDate, Voucher and AmountMST. 5. Save the report.
4-6
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
This is the recommended method to use if a specific format and look is required.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
4-7
FIGURE 4.5
4-8
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
4-9
4-10
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
4-11
FIGURE 4.7
Report Templates
When designing reports, the option is available to work from several templates in the standard Microsoft Dynamics AX 2009 application or to create a new template. When applying a template to a report design, several layout elements built into the template are automatically received. A template can include the following: Page numbers on each page A specific company logo A specific disclaimer required for all reports
If reports share the same template, apply changes to the report template. The changes are inherited by the reports using this template. Inheritance of report elements is a significant advantage for report design because many elements of a report are repetitive. Using a report template eliminates redesigning report sections as headers, disclaimers, and other typically used elements.
4-12
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
7. Save the method and close the Code Editor. 8. To view the value returned from the display method, attach the method to the CompanyName control on the Prolog by assigning the DataMethod property the value of CompanyName. 9. Because this is on the front of the report, make the font size of this control larger. Set the FontSize property to 20.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
4-13
Section Templates
Section Templates make it possible to define sections one time and reuse them many times. Typically this is used for elements appearing in more than one report. For example, a customer wants to customize the layout of all checks printed from Microsoft Dynamics AX 2009. Instead of changing all the reports that print a check, change only the check section template.
4-14
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Paper Format
When running a report in Microsoft Dynamics AX 2009, the paper format must be specified for each report type. For example, open the Accounts Receivable module, then Setup, then Forms, and open Form setup. On the Packing slip tab, in the Layout section, view an example of where the Paper format can be specified. Microsoft Dynamics AX 2009 reports use three standard paper formats: Blank Paper - This is used when nothing is pre-printed on the paper for the report. This choice gives the user a Header, optionally a logo, and all system labels assigned to the printed system data. Partly preprinted or Semi preprinted - This is used for paper without a header. This choice gives the user no Header, but gives all system labels assigned to the printed system data. Preprinted - This option is used if the user does not want anything except the system data printed on the report. This choice gives the user no Header and no labels.
Summary
This course discussed the Microsoft Dynamics AX 2009 techniques for generating a report from the database as a printed document. The location in the AOT of all reports is shown to allow access to adjust and create report elements. This course also discussed tools such as the Visual Report Designer, Templates and MorphX which are used to allow adjustments of report layouts.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
4-15
2. contain which items? Mark all that apply. (Select all that apply.) ( ) Bodies ( ) Footers ( ) Headers ( ) Page Footers What are some features of the Visual Report Designer that make it an ideal choice for designing reports?
4-16
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2.
3.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
4-17
Solutions
Test Your Knowledge
1. What are the three major components that constitute a Microsoft Dynamics AX 2009 report? Mark all that apply. (Select all that apply.) () Designs () Datasources () Methods ( ) Layouts 2. What is the difference between an AutoDesign specification and a custom GeneratedDesign specification? MODEL ANSWER - When you are using AutoDesignSpecs, the report layout is generated when the report is run. Its content and layout are based on the query used for the report. In a GeneratedDesign the layout is dictated by its design structure that is created in the Visual Report Designer and not by a query or report template. 3. A Section group can contain which items? Mark all that apply. (Select all that apply.) () Bodies () Footers () Headers ( ) Page Footers 4. What are some features of the Visual Report Designer that make it an ideal choice for designing reports? MODEL ANSWER - The Visual Report Designer allows you to drag and drop report field elements for placement in the report. It allows you to change the scaling while in design mode so you can place your objects more accurately.
4-18
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement