2. In Visual Studio, click File > New > Project. The New Project dialog box is displayed.
3. In the Installed Templates section, click Microsoft Dynamics AX and then click Report Model.
4. In the Name box, type SalesReport and in the Location box, type a location.
5. Click OK.
6. In Visual Studio Solution Explorer, right-click the SalesReport project, point to Add, and then click Report Datasource. The model opens in Model Editor.
7. In Model Editor, select the node for the data source.
8. In the Properties window, specify the following values:
o Name: SalesReportOLAPData
o Provider: OLAP
9. For the Connection String parameter enter the following:
Provider=MSOLAP.4;Integrated Security=SSPI;Persist Security
Info=True;Data Source=[YourServerName];Initial
Catalog=Dynamics AX
Replace [YourServerName] with the name of your server, such as
SEA-DEV.
10. In Visual Studio Solution Explorer, right-click the SalesReport project, point to Add, and then click Report.
11. Select the Report1 node.
12. In the Properties window, type "SalesChart" as the name.
13. Expand the node for the report if it is not already expanded.
14. Right-click the Datasets node, and then click Add Dataset.
15. Select the node for the dataset.
16. In the Properties window, specify the following values:
o Data Source: SalesReportOLAPDatao Data Source Type: Queryo Default Layout: ColumnCharto Name: Sales
17. For the Query property, enter the following expression: SELECT
{[Measures].[Customer invoice amount - accounting currency]} ON
COLUMNS,
{[Date].[Year].&[2008-01-01T00:00:00],
[Date].[Year].&[2009-01-01T00:00:00],
[Date].[Year].&[2010-01-01T00:00:00]}
ON ROWS
FROM "Sales cube"
18. Click OK to save the query.
19. In Model Editor, drag the Sales dataset onto the Designs node to create an auto design.
20. In Model Editor, select AutoDesign1 node.
21. In the Properties window, set the LayoutTemplate property to ReportLayoutStyleTemplate.
22. In Model Editor, expand the AutoDesign1 node, and then select SalesXYChart node.
23. In the Properties window, set the Style Template property to ColumnChartStypleTemplate.
24. Click Deploy SalesReport on the Build menu.
25. Right-click the SalesReport project and then click Add SalesReport to AOT.
26. Open the development workspace in Microsoft Dynamics AX. If it was already open, close and re-open it to refresh the metadata.
27. Open the AOT. Expand the Menu Items node, right-click Output, and then click New Menu Item.
28. On the properties sheet for the new menu item, set the following values.
o Name: SalesReport
o Label: Sales Chart
o Object Type: SSRSReport
o Object: SalesChart
o ReportDesign: AutoDesign1
29. In Microsoft Dynamics AX, navigate to System Administration >Common > Users > User Profiles.
30. Select the Sales Manager profile and click View Role Center.
31. On the Site Actions menu, click Edit Page. Locate the Middle Column section and then click Add a Web Part.
32. Select Microsoft Dynamics AX, click Report, and then click Add.
33. On the Edit menu for the web part, click Edit Web Part. The properties for the web part are displayed.
34. Click the lower-right area of the Right Column (where the bottom scroll bar should be) to cause the scroll bars to appear.
35. In the Select a report section, select Sales Chart.
36. Click OK.
37. To view the completed role center page, close the Enterprise Portal and re-open by clicking View Role Center from the Microsoft Dynamics AX User Profile window.
Regards,
Hossein Karimi
No comments:
Post a Comment