You are on page 1of 56

Report

Report development on Microsoft Dynamics AX 2009

Agenda
1. 2. 3. 4. 5. 6. Overview Report Wizard Auto Report Object Report Report Development Report and Section Template

1. Overview
A. B. C. D. E. Overview Type Creating Report Auto Report Form Report Wizard Step to Develop

1.

Overview

A.Report Type
Ad hoc report
A non periodic report that created and used for specific purpose and time

Periodic report
Report that created and used periodically (daily, weekly, monthly etc)

Form
Fixed format formal document in a workflow of business process as reference or fact in that process (e.g Delivery Order, Invoice , Voucher etc )

1.

Overview

B. Creating Report
Auto report
Using wizard to generate a report Used for ad hoc report and simple periodic report

Custom Report
Created in AOT Use X++ Flexible design Used for periodic report or form document

1.

Overview

C. Auto Report on Form


Open from print menu in tool bar when a form is opened Simple design Data source of report using forms query Able to create various version of auto report in a form Able to attach new created auto report into menu

1.

Overview

D. Report Wizard
Use report wizard to :
Create new simple report Create or modify auto report on form

Accessed from tool bar in main menu and print menu of particular form

1. Overview

E. Step to develop
a. b. c. d. e. f. Create a project Create AOT Structure in the project Create Report Object Assign data source into report object Design layout Attach to menu

2. Report Wizard
Wizard that will be use to generate simple or ad hoc report

A. B. C. D. E. F.

Navigation Object Name Selection Name of Report Table Selection Field Selection Summation Field

G. H. I. J. K. L. M.

Subheadings Grouping Ranging Page Layout & Orientation Preview Attach to Menu Result

2. Report Wizard

Scenario
As a user that has no skill in technical aspect of Ms Dynamics AX, youve got assignment to create a sales report quickly, this report should be consist information about sales quantity and amount of sales by customer. To accomplish this, you create it using report wizard.

2. Report Wizard

A. Navigation
Microsoft Dynamics AX > Tools > Development Tools > Wizards > Report Wizard

2. Report Wizard

B. Object name method


Choose whether name of table or field will be shown is system name or not ( e.g CustTable rather than Customers) Klik Next Button

2. Report Wizard

C. Name of report
Enter name of report and caption e.g : Name : SalesOrderList Caption : List of Sales Order Klik Next Button

2. Report Wizard

D. Table Selection
Select table(s) from All Tables box and table that are related to the selected tables box if required Click Next button

2. Report Wizard

E. Field Selection
Select field, display method or field group that will be display on report Click button Up or Down to move selected field Click Next button

2. Report Wizard

F. Summation Field
Select field that will be summed and display at bottom of data from available fields box into selected fields box Checked Sums total for total summarized, sums potitive for postive value only or sums negative for negative value only Click Next button

2. Report Wizard

G. Subheadings
Checked if you want to this field as header of a group data that belong to this field, otherwise unchecked Click Next Button

2. Report Wizard

H. Grouping
Check this field if you want to display sum of all fields that available to sum, otherwise unchecked Click Next Button

2. Report Wizard

I. Ranging
Select field(s) that will be use for filtering data coming from data source Click Next Button

2. Report Wizard

J. Page Layout & Orientation


Select layout, page orientation and report template if available Click Next Button

2. Report Wizard

K. Print Preview
Choose whether created report will be put at menu or no Klik Design button to open report design Klik Print preview to display report data

Klik Next Button

2. Report Wizard

L. Attach to Menu
Move report from Reports box into particular menu item Klik Next or Finish Button

2. Report Wizard

M. Print Preview

3. Auto Report
Print report from a form and modify it to fit simple or ad hoc report that fit user demand

A. Print Preview B. Print Auto Report C. New Auto Report D. Save Auto Report in AOT

3. Auto Report

Scenario
As a user that has got access to auto report in sales order form, you and your boss need new version of current report, now you have to create it and put it in menu in order other user able to run it from menu.

3. Auto Report

A. Print preview auto report


Open a form Click Print preview icon at tool bar to display auto report

3. Auto Report

B. Print auto report


Open a form Click Print Icon Select a report from select report field Click select button to specify range value Click Options button to select printer or page layout Click OK Button

3. Auto Report

C. New Auto Report


Open a form Click Modify button Click New Follow Wizard Click OK button

3. Auto Report

D. Save Auto Report Into AOT


Open a form Select a report Click Modify button Click save in AOT Follow Wizard Click OK Button

4. Report Object
A. Element Report B. Data Source C. Report Design D. Report Section

4. Report Object

Scenario
As a user that has limited skill in technical aspect of Ms Dynamics AX, youve got assignment from your boss to create new report of purchasing, in this report consist of information about purchase quantity and amount any goods to a vendor

4. Object Report

A. Element Report
Data source Report design Report Section

4. Object Report

B. Data Source
Source of data where data is fetch from and send to report to be print It can be :

One or more table View Quer

Add table or view into DataSource node in report object structure Add query into CompositeQuery node in report object structure

4. Object Report

C. Report design
Manage report layout Can be more than one report design Two type report design, AutoDesignSpecs and GeneratedDesign AutoDesignSpecs, layout will be generate when report is run GeneratedDesign, layout will be generate based on structure that created using design editor

4. Object Report

D. Report Section
Report design consist of some sections Those sections are prolog, page header, header, section group, footer, page footer, epilog and programmable section Can be standardized using section template and report template

Continue

4. Object Report

D. Report Section
Section
Prolog PageHeader Header

Description
Appears at the beginning of a report. Use it to display items such as a logo, a report title, or the current date. The prolog is printed before the page header on the first page of the report. Appears at the top of every page in a report. Only available for generated designs. Appears at the beginning of a new group of records. Use it to display items such as a group name. Only available for generated designs. Appears in the middle of a report. A section group can contain a Header, Body, or a Footer section. The structure of data sources is reflected in the structure of the section groups. Appears in the middle of the report. A body section contains controls or a SectionGroup. The controls show information from fields in the data sources (tables), or information provided by display methods. Only available for generated designs. Appears at the end of a group of records. Use it to display items such as sub totals. Appears at the bottom of every page in a report. Use it to display items such as page numbers. Appears at the end of the report. Use it to display items such as a logo. The epilog is printed just after the page footer on the last page in a report. Use programmable sections to add any kind of customized information. To activate a programmable section, activate it explicitly with an element.execute(Number) statement. The Number must be specified in the ControlNumber property for the design section.

SectionGroup

Body

Footer PageFooter Epilog

ProgrammableSection

5. Development
A. B. C. D. E. F. G. General step report development Project and its structure Report object Adding data source and its related data source Adding Report design Adding report section Edit report design using visual editor

5. Development

A. General step
Generally to create custom report, some steps to be done are :
Create Project and its structure Create report object under report node in its project Add data source Generate design Edit design if it is custom report Attach report into menu

5. Development

B. Project and Structure


Create shared project :

Click Project Icon On Shared Node in Projects windows, Right click > New > Project Right click on Project# > rename Enter new Name of project Right click > Open

Continue

5. Development

B. Project and its structure


Create Objects group
A. Create Report Group 1. Open project that you created 2. Right click > New > Group 3. At Object node, open properties pane 4. At properties pane, enter Report at field name, Reports at ProjectGroupType Create Menu Item group 1. Repeat poin A 1 to 4, give it name Menu Item and ProjectGroupType is MenuItems 2. Under Menu Item node, repeat poin A1 to 4, give it Display for name and Display for ProjectGroupType Create Menu 1. Under Project name, repeat point A1 to 4 2. Give it Menu for field name and Menus for ProjectGroupType Click Save All icon

B.

C.

D.

5. Development

C. Report Object
1. 2. 3. 4. Under Report Node, right click > new > Report At Report# node, open properties Enter name of report at field name, in this case PurchaseOrderList Click Save All (Ctrl + Shift + S)

5. Development

D. Add Data Source


1. 2. 3. 4. Open Project Open report object that you have created Expand Datasource > Query Add data source either from table, view or query by one of the following way Drag a table or view from AOT and drop at Datasource node Drag a query from AOT and drop at CompositeQuery node At node datasource or compositeQuery, right click > New Data Source > add table, view or query 5. Click Save All

Continue

5. Development

D.Add Related Datasource


1. 2. 3. 4. 5. 6. 7. Open project Open report object Expand datasource node Add new data source under current data source At new datasource node, open properties window Enter value Yes at field relations otherwise create relation manually Click Save All

5. Development

E. Report Design
1. 2. 3. 4. 5. 6. 7. Open project Open report object At design node, right click > New Report Design Open properties at ReportDesign# node Enter name of design at field name Enter report template if required Click Save All

5. Development

E.

Section in AutoDesignSpec Manually


Add Manually 1. Open project 2. Open report object 3. Expand design > Report Design 4. At AutoDesignSpec node, Right click > New > [Sections>] 5. At body section, add field, field group or display method 6. At other section, e.g Page Header, Page footer, add required item 7. Click Save All

5. Development

F. Section in AutoDesignSpec
1. Open project 2. Open report object 3. Expand designs > Report Design Node 4. At AutoDesignSpec node, Right click > Generate Specs From Query 5. Add page header and footer if required 6. Add fields under body, page footer and page header 7. Click Sava All

5. Development

G. Section in Generated Design


1. 2. 3. 4. Open project Open report object Expand design node At Report Design node, Right click > Generate Design 5. Expand GeneratedDesign node 6. Add other required section (e.g page header, page footer etc.) 7. Expand Section Group node 8. Add other required section (Header, footer etc) 9. Under Body node, add required field or field group 10. Click Save All

5. Development

H. Visual Layout
Use visual layout design to arrange layout of report visually Under GerateDesign or AutoSpecDesign node, Right click > Edit to open visual design editor Use properties windows to modify appearance of its control e.g position, color, font etc.

5. Development

I. Report Template
Use report template to standardize of report section It could be header, footer etc. There are some predefined report template that can be ready to use Create in AOT > Reports > Report Template Use it when create a report object by specify in design properties, field report template

5. Development

J. Section Template
Use section template to standardize of body report Create in AOT > Reports > Section Template Used under section group in report by Section Group > New > Section Template In properties of section template, specify section template name

5. Development

K. Attach to Menu

Create Menu Item Attached menu item into menu

5. Development

L. Create Menu Item


Open Project Drag report object (in this case PurchaseOrderList) and drop into Display node under menu item node Open properties of menu item PurchaseOrderList Enter label for this menu item Make sure field Object Type value is Report Make sure field Object is report object name ( in this case PurchaseOrderList) Click Save All

5. Development

M. Attach Into Menu


Open project Drag menu item PurchaseOrderList and drop into menu object Click Save All

6. Deployment
A. Use XPO file to deploy a project or object, XPO is a text file consisting code definition of project or object B. Export, export XPO from development server C. Import, import XPO into Production server

6. Deployment

A.Export XPO file


Open Project At project name, right click > export In Export to windows, specify folder and file name Uncheck field Export with ID values in Options group box Click OK

6. Deployment

B. Export XPO file


Open Project or AOT Click import Icon at tool bar At import window, uncheck field Import with ID Values Select folder and XPO file name Click OK Button

You might also like