Dynamics AX is a modern ERP solution from Microsoft that is targeted at mid- and high-level organizations. PDF下载地址( MB) Microsoft Dynamics AX R3 Reporting Cookbook focuses mainly on the reporting aspects of. Microsoft Dynamics AX R3 Reporting Cookbook - Sample Chapter - Free download as PDF File .pdf), Text File .txt) or read online for free. Chapter No. Please zip the download microsoft dynamics ax r3 reporting cookbook over 90 the work's available PDF is to sign capabilities with fibre-optic journals.
|Language:||English, Spanish, Portuguese|
|Genre:||Fiction & Literature|
|ePub File Size:||23.62 MB|
|PDF File Size:||19.39 MB|
|Distribution:||Free* [*Sign up for free]|
Reporting Cookbook By Agarwal Deepak Aggarwal Chhavi Elangovan Kamalakannan Paperback [PDF] [EPUB] -. MICROSOFT DYNAMICS AX R3. Over 90 recipes to help you resolve your new SSRS Reporting woes in Dynamics AX R3. There no better way of getting to grips with the Dynamics AX framework than learning by example. This cookbook is packed with recipes for.
What you will learn from this book Understand the report programming flow Modify the reporting framework Design tabular matrix and chart-based reports Debug reports, the reporting framework, and business logic Migrate reports from the legacy reporting framework Use web services, OLAP, and external data sources to create your report Learn how to approach report modifications In Detail Dynamics AX is a modern ERP solution from Microsoft that is targeted at the mid-and-high-level organizations. It is seeing an increased rate of adoption due to its tighter integration with the Microsoft technology stack and the flexibility it offers. Reports play a very central role in an ERP system being accessible to customers, vendors, top management and the shop floor. Every ERP implementation includes reporting changes as companies try to refit the reports to their standards and processes. As a Dynamics AX developer, reporting skills are a must-have and this book intends to make report development easier and simpler.
Write a job in Dynamics AX that will use the query to retrieve the data and print the values to the infolog. This will help in identifying the problem when there is an issue with the report. The report supports multiple datasets, but as in AX forms these datasets cannot be joined and they remain independent. Creating auto designs from datasets There are two ways to design an SSRS report in Visual Studio: Precision design: This is for advanced structured design Auto design: This is for general tabular design In this recipe, we will create a simple auto design report by using the dataset added in the previous recipe, which will fetch the data and show it in the report.
In auto design, there are layouts that are already built in, and we can choose one in which we want to show the data, based on our preferences. Getting ready To develop reports in Dynamics AX R3, you need Visual Studio, through which you can design, develop, and deploy the reports. SQL Reporting Services must be properly installed and configured. You must also have access to the reporting manager to manage and see the reports present in AX R3.
In this recipe, we will add an auto design under the Design node of the report. We will then assign its layout properties to ReportLayoutStyleTemplate and print the report. Chapter 1 There are some standard report templates in AX.
You can choose any of them for pre-designed layouts. Right-click on the Designs node, select Add, and then select Auto Design. This will create a new auto design under the Design node. Rename it as VendorMaster.
Under the new auto design node, right-click on VendorMaster and select Add Table.
Notice that the fields are added to the table design automatically. Right-click on Auto design VendorMaster and select Preview. This will show a preview of the report.
To rearrange the fields as per the user requirement, go to the Data node under the Table node. The default type determines what kind of control is added when the dataset is dragged and dropped into the auto design node. Templates: Templates are responsible for printing the header, footer, and company name on a report.
They also manage the font and colors. Currently, AX does not support printing the company image in the header through auto design. Report preview: This accesses the default company in AX to show a report preview. So, ensure that the default company in AX has data, otherwise you may not find data in the preview.
Standard SSRS reporting doesn't have the concept of auto design. Grouping in reports Grouping means putting things into groups. In the previous recipe, all the data shown in the report was listed sequentially. Grouping data simplifies the structure of the report and makes it more readable.
It also helps you to find details, if required. In this recipe, we will structure the report by grouping the VendorMaster report based on the VendorGroup to make the report more readable.
In this recipe, we will add fields under the grouping node of the dataset created earlier in Visual Studio. The fields that have been added in the grouping node will be added and shown automatically in the SSRS report.
Go to Dataset and select the VendGroup field. Drag and drop it to the Groupings node under the VendorMaster auto design. This will automatically create a new grouping node and add the VendGroup field to the group.
Each grouping has a header row where even fields that don't belong to the group but need to be displayed in the grouped node can be added. This groups the record and also acts like a header, as seen in the following screenshot: 12 Chapter 1 How it works Grouping can also be done based on multiple fields. She has also worked with the Microsoft team for standard base development. Kamalakannan Elangovan has over 8 years of development experience in Dynamics AX.
In the past, he has worked with Innovites to create the first multidimensional ISV solution for cable industries called "InnoVites for cable".
Building the solution from scratch, he gained great insights into building, selling, and promoting a product among customers and partners in the Microsoft Ecosystem. You can find out more about him at Kamal is enthusiastic about sharing his learnings with the community, which led him to create one of the first few blogs for AX in It is currently available at. He is active on Twitter and is very well known in the community by his pseudonym, "Casperkamal".
Microsoft Dynamics AX R3 Reporting Cookbook Reporting provides consolidated, factual, and up-to date information about any area of business in an organization. This will help the organization member to take the right decision for their business.
It acts as a treasure trove of reliable information for long-term planning and decision making. This chapter will also help you understand the basic characteristics of reports. Chapter 2, Enhancing Your Report Visualization and Interaction, covers how to enhance the visualization and interaction of reports through parameters, creating data regions and charts, and formatting the reports. In this chapter, we will create a report using RDP classes. Chapter 5, Integrating External Datasources, covers how the SSRS reports can be extended to include other data sources or through the integration framework.
Chapter 6, Beyond Tabular Reports, helps you understand the other formats of reports such as using matrices and charts. This book also covers the interesting components of reports such as gauges, rectangles, and lists.
This will also introduce the log viewer through which you can analyze the report usage and its log. Chapter 9, Developing Reports with Complex Databases, discusses developing the SSRS reports that have complex data and how to drive that data into reports using maps, views, and queries.
Chapter 10, Unit Test Class and Best Practices Used for Reports, helps you create the unit test classes for a report, which will help you test the business logic being written to develop reports. It will also tell you best practices to be followed when developing the reports. Introduction Reports are a basic necessity for any business process, as they aid in making critical decisions by analyzing all the data together in a customized manner.
Reports can be fetched in many types, such as ad-hoc, analytical, transactional, general statements, and many more by using images, pie charts, and many other graphical representations. These reports help the user to undertake required actions. These steps have further been detailed into simpler and smaller recipes. In this chapter, you will design a report using queries with simple formatting, and then deploy the report to the reporting server to make it available for the user.
This is made easily accessible inside the rich client. It is the best way to generate analytical, high user scale, transactional, and cost-effective reports. SSRS reports offer ease of customization of reports so that you can get what you want to see.
SSRS provides a complete reporting platform that enables the development, design, deployment, and delivery of interactive reports. They have extensive reporting capabilities and can easily be exported to Excel, Word, and PDF formats. While there are many methodologies to generate reports, SSRS remains the prominent way to generate analytical and transactional reports. SSRS reports can be developed using classes and queries.
In this chapter, we will discuss query-based reports.
Reports using classes will be discussed in later chapters. In query-based reports, a query is used as the data source to fetch the data from Dynamics AX R3. We add the grouping and ranges in the query to filter the data.
We use the auto design reporting feature to create a report, which is then deployed to the reporting server. After deploying the report, a menu item is attached to the report in Dynamics AX R3 so that the user can display the report from AX R3.
Through the recipes in this chapter, we will build a vendor master report. This report will list all the vendors under each vendor group. It will use the query data source to fetch data from Dynamics AX and subsequently create an auto design-based report. So that this report can be accessed from a rich client, it will then be deployed to the reporting servicer and attached to a menu item in AX. Here are some important links to get started with this chapter:.
Install Reporting Services extensions from https: Install Visual Studio Tools from https: Before you install the Reporting Services extensions see https: They are also very easy to design. We can create queries in two ways: Later on, we will guide you on how to add the query as a data source through Visual Studio. How to do it Go to AOT Queries and add a new query. Go to query's data source node and add the new data source.
Rename the data source to VendTable and set property table to VendTable. There are two steps to select fields from VendTable. You can use any of these:. This will automatically add all the fields in the VendTable to the query.
Drag and drop the required field directly from the table. This is the best way to optimize the query and, consequently, reduce the fetch time, so we will go for this option in our recipes. Now open Visual Studio. Navigate to File New Project. Chapter 1 Now open the report by double-clicking on it in Solution Explorer.
Right-click on the Dataset node and select the New Dataset option. Rename the dataset as VendorMaster. Now, right-click on the VendorMaster dataset and select Properties. Click on the ellipsis button. Select All Fields since we dropped all the unwanted fields during the creation of the query. From the All Display Methods node, select Name. Click on the OK button.
This will generate the fields list for the dataset. This completes the addition of a dataset to a report. When you have multiple instances of Dynamics AX installed, Visual Studio identifies the instance to connect to from the client configuration. The active client configuration is used to establish the connection. The layer in which the report must be created is also fetched from the client configuration.
This includes the metadata service, query service, and user session service. The SSRS reporting extension uses the query and metadata services.
The query service is used to fetch the data. Verify the query In the case of a complex query, a better approach would be validating the query before it is included in the report. Write a job in Dynamics AX that will use the query to retrieve the data and print the values to the infolog.
This will help in identifying the problem when there is an issue with the report. No joins The report supports multiple datasets, but as in AX forms these datasets cannot be joined and they remain independent. In this recipe, we will create a simple auto design report by using the dataset added in the previous recipe, which will fetch the data and show it in the report.
In auto design, there are layouts that are already built in, and we can choose one in which we want to show the data, based on our preferences. Getting ready To develop reports in Dynamics AX R3, you need Visual Studio, through which you can design, develop, and deploy the reports. SQL Reporting Services must be properly installed and configured.
You must also have access to the reporting manager to manage and see the reports present in AX R3. In this recipe, we will add an auto design under the Design node of the report. We will then assign its layout properties to ReportLayoutStyleTemplate and print the report.
Chapter 1 There are some standard report templates in AX. You can choose any of them for pre-designed layouts. Right-click on the Designs node, select Add, and then select Auto Design.
Notes docuRef. TableId; vendTable. RecId; 'Note'; 'Imported'; 'This vendor was imported. Run the job to create the note. Click on the Attachments button in the form's action pane or select Document handling from the File Command menu to view the note added by our code: 20 Chapter 1 How it works In our recipe, we will set those fields to the vendor company ID, vendor table ID, and vendor account record ID, respectively.
Next, we will set note type, name, and description, and insert the document handling record. In this way, we will add a note to the record.
The code in this recipe could also be added to a separate method for further reuse. Using a normal table as a temporary table Standard Dynamics AX contains numerous temporary tables, which are used by the application and could be used in custom modifications too. Although new temporary tables can also be easily created using the AOT, sometimes it is not effective. One of the cases could be when the temporary table is very similar or exactly the same as an existing one.
The goal of this recipe is to demonstrate an approach for using standard non-temporary tables to hold temporary data. As an example, we will use the vendor table to insert and display a couple of temporary records without affecting the actual data. AccountNum, vendTable. Run the class and check the results: How it works The key method in this recipe is in the setTmp method.
It is available on all tables, and it declares the current table instance to behave as a temporary table in the current scope. So in this recipe, we will first call the setTmp method on the vendTable table to make it temporary in the scope of this method. That means any data manipulations will be lost once the execution of this method is over and actual table content will not be affected. Next, we will insert a couple of test records. Here, we use the doInsert method to bypass any additional logic, which normally resides in the table's insert method.
The last thing to do is to check for newly created records by listing the vendTable table. We can see that although the table contains many actual records, only the ones which we inserted were displayed in the Infolog. Additionally, the two we inserted do not appear in the actual table records. Copying a record One of the tasks often used when manipulating data is record copying. For various reasons, an existing record needs to be modified and saved as a new one.
The most obvious example could be when a user requires a function that allows him or her to quickly duplicate records on any of the existing forms. In this recipe, we will explain the usage of the table's data method, the global buf2buf function, and their differences. As an example, we will copy one of the existing ledger account records into a new one.
Open General ledger Common Main accounts, and find the account to be copied. In this example, we will use 2. Open General ledger Common Main accounts again, and notice that there are two identical records now: How it works In this recipe, we have two variables—mainAccount1 for original record and mainAccount2 for the new one.
Next, we will copy it to the new one. Here, we will use the data table member method, which copies all data fields from one variable to another. After that, we will set a new ledger account number, which is a part of a unique table index and must be different.
Finally, we call the insert method on the table, if validateWrite is successful. In this way, we have created a new ledger account record, which is exactly the same as the existing one apart from the account number.
There's more As we saw before, the data method copies all table fields, including system fields such as record ID, company account, created user, and so on. Most of the time, it is OK because when the new record is saved, the system fields are overwritten with the new values.
However, this function may not work for copying records across companies. In this case, we can use another function called buf2Buf.
It is very similar to the table's data method with one major difference. The buf2Buf function copies all data fields excluding the system ones. We can also see that this function is slower than the internal data method, as it checks and copies each field individually. Normally, queries are stored in the AOT, but they can also be dynamically created from code. This is normally done when visual tools cannot handle complex and dynamic queries. In this recipe, we will create a query dynamically from the code to retrieve project records from the project management module.
We will select only the projects of type fixed price, starting with 2 in its number and containing at least one hour transaction. ProjId, projTable. Name, projTable. Run the job and the following screen should appear: How it works First, we create a new query object. Next, we add a new ProjTable data source to the query object by calling its addDataSource member method.
The method returns a reference to the QueryBuildDataSource object—qbds1. Here, we call the addSortField method to enable sorting by project name. The following two blocks of code create two ranges. The first is to show only projects of type fixed price and the second one is to list only records, where the project number starts with 2. Those two filters are automatically added together using the SQL and operator.
The range value is set by calling value on the QueryBuildRange object itself. It is a good practice to use the queryValue function to process values before applying them as a range. More functions such as queryNotValue , queryRange , and so on can be found in the Global application class.