8 ways to improve reporting...

12
D Atlas for Microsoft Dynamics AX 8 WAYS TO Improve Reporting Performance.

Upload: hoangkhanh

Post on 27-Jun-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 8 WAYS TO IMPROVE REPORTING PERFORMANCE62f10e0162f5f0afe756-b636a0949b3e058367a6f2ae35c88177.r63.cf2... · 8 WAYS TO Improve Reporting Performance. D 1 ... Manual Calculation for

D

Atlas for Microsoft Dynamics AX

8 WAYS TO Improve Reporting Performance.

Page 2: 8 WAYS TO IMPROVE REPORTING PERFORMANCE62f10e0162f5f0afe756-b636a0949b3e058367a6f2ae35c88177.r63.cf2... · 8 WAYS TO Improve Reporting Performance. D 1 ... Manual Calculation for

D

1 | 8 WAYS TO Improve Reporting Performance.

#1 - FORMATTING

When Atlas returns a structured report, it performs two operations: firstly, it reports the data from AX into Excel;

secondly, it formats the data using Excel functionality.

This results in a formatted report being generated such as:

Example - Atlas Formatted Report

If such a report is taking excessively long, it is possible to remove the Excel formatting from the report’s Atlas properties,

which will improve performance:-

1. Place the cursor within the table object (report)

2. Open the report definitions

3. Select the report header; in this example, ‘Customers’

4. Select ‘Properties’ button: a separate pane opens

5. Un-tick ‘Formatting’, click ‘OK’ and ‘Insert’

Page 3: 8 WAYS TO IMPROVE REPORTING PERFORMANCE62f10e0162f5f0afe756-b636a0949b3e058367a6f2ae35c88177.r63.cf2... · 8 WAYS TO Improve Reporting Performance. D 1 ... Manual Calculation for

D

Example - Removal of Formatting

Page 4: 8 WAYS TO IMPROVE REPORTING PERFORMANCE62f10e0162f5f0afe756-b636a0949b3e058367a6f2ae35c88177.r63.cf2... · 8 WAYS TO Improve Reporting Performance. D 1 ... Manual Calculation for

D

#2 - LEANER REPORTS – REMOVE UNNECESSARY REPORTED FIELDS

When designing a report, care should be taken to ensure that only necessary fields and calculations are included in the

report’s output.

When creating a report, the main reasons for outputting the data into Excel are:

i. Presenting the data to the end-user

ii. Using a reported field in a subsequent upload

iii. Allowing a secondary report to be generated from the main report (and to link Atlas’ managed columns)

Therefore the key tips to consider when designing reports are:

a. Avoid including unnecessary fields

b. Customise each report, so it is fit for its specific purpose

c. Avoid excessively large ‘one-size-fits all’ reports, which fulfill multiple functions

Ultimately, reports should be built as leanly as possible, justifying the presence of each field or calculation individually.

Example - Unnecessary Fields

Page 5: 8 WAYS TO IMPROVE REPORTING PERFORMANCE62f10e0162f5f0afe756-b636a0949b3e058367a6f2ae35c88177.r63.cf2... · 8 WAYS TO Improve Reporting Performance. D 1 ... Manual Calculation for

D

#3 - USE DATABASE JOINS

Ideally when creating an Atlas report, data from other tables should be joined by using the existing table relation joins

in AX.

Atlas allows users to do this by customizing both the output and the filters, so that Atlas links tables, effectively creating

an AX View.

This is done by opening the ‘Add/Remove Fields’ in the Atlas UI and linking tables using the green plus ( ) next to

fields which join to a main table.

The benefit here is that AX’s table architecture is used to improve efficiency, which is particularly relevant for structured

reports, when only one call is made on the AOS.

Similarly, where possible, a natural join should always be used instead of Atlas’ managed columns, since managed

columns do result in a greater load on the server.

Example - Table Joins

.

Page 6: 8 WAYS TO IMPROVE REPORTING PERFORMANCE62f10e0162f5f0afe756-b636a0949b3e058367a6f2ae35c88177.r63.cf2... · 8 WAYS TO Improve Reporting Performance. D 1 ... Manual Calculation for

D

#4 - REDUCE FILTERS

Within any one report, the number of filters should be limited, as Atlas will refresh a report once each individual filter

has been changed.

For example, if a report contains six (6) filters, the report will potentially be refreshed six times, lasting six times longer

than a single filter. Therefore, if a filter is not likely to be changed, it would be advisable to hard code this into the Atlas

UI.

Example - Filter is hard coded into UI

Best Practice for Multiple Filters

If a report does contain many filters, then the user should switch to manual calculation while the filters are being

changed. Atlas offers two options:

i) Manual Calculation for whole workbook

This will ensure that the report is only refreshed once, based on user input – here, the user would select the ‘Refresh’

button on the ribbon bar.

Page 7: 8 WAYS TO IMPROVE REPORTING PERFORMANCE62f10e0162f5f0afe756-b636a0949b3e058367a6f2ae35c88177.r63.cf2... · 8 WAYS TO Improve Reporting Performance. D 1 ... Manual Calculation for

D

Atlas Function - Refresh

ii) Manual Calculation for Specific Report

The properties for each report can be changed so that the specific report does not refresh automatically by

following these steps:

Open report definitions

Select report header

Open Properties

Disable the ‘Refresh’ and ‘Auto refresh enabled’ tick boxes

Example - Refresh Properties for Report

The user can refresh the report by clicking on the ‘Refresh’ button in the Atlas ribbon bar:

Atlas Function - Refresh Button

Page 8: 8 WAYS TO IMPROVE REPORTING PERFORMANCE62f10e0162f5f0afe756-b636a0949b3e058367a6f2ae35c88177.r63.cf2... · 8 WAYS TO Improve Reporting Performance. D 1 ... Manual Calculation for

D

#5 - INDEX FREQUENT FILTERS

If reports are frequently filtering on a field which is not indexed in AX, then SQL runs through every single record before

returning the dataset.

Once commonly used fields are indexed in AX, SQL will not need to interrogate all the transactions, just the indexed

ones, resulting in a faster report.

It is not recommended to deploy this technique for one-off queries.

This indexing of fields is normally performed by an AX developer.

For example, in the Customer Transactions (CustrTrans) table, it is feasible that many reports will use the Currency and

Dimension as a regular filter, however in the attached screenshot these fields are not included in the table’s index:

AOT - Indexes in CustTrans

Page 9: 8 WAYS TO IMPROVE REPORTING PERFORMANCE62f10e0162f5f0afe756-b636a0949b3e058367a6f2ae35c88177.r63.cf2... · 8 WAYS TO Improve Reporting Performance. D 1 ... Manual Calculation for

D

#6 - MANAGED COLUMNS – KEEP TO A MINIMUM

Managed columns are a very powerful, useful tool for creating sophisticated reports, which return data from different

tables, essentially creating an AX View.

However, as they are not part of a main structured report, they do result in multiple calls on the database, since each

cell in a managed column contains a free format report (Balance ‘Atlas Balance’ or Column ‘AtlasTable’), which

generates a separate call on the AOS and SQL Server.

When designing a report, natural database joins within the database should be used in the main structured report

where possible.

Whilst it is difficult to give a precise benchmark, Designers may notice a reduction in performance if more than five (5)

managed columns are used in the same report.

Best Practice for Managed Columns (I)

If the report contains a large managed column, then our recommendation is to introduce a cached (In Memory)

managed column.

The benefit is that once the report is refreshed, there will just be one call on the AOS and SQL Server, rather than an

individual call for each balance within the managed column.

Best Practice for Managed Columns (II)

Once a report has been completed, use Excel’s ‘Find’ function (CTRL+F) to count the number of AtlasBalance and

AtlasTable formulae in a report: this will indicate the number of separate calls on the AOS and SQL Server.

Example - Finding Balances in Excel

Page 10: 8 WAYS TO IMPROVE REPORTING PERFORMANCE62f10e0162f5f0afe756-b636a0949b3e058367a6f2ae35c88177.r63.cf2... · 8 WAYS TO Improve Reporting Performance. D 1 ... Manual Calculation for

D

#7 - MULTIPLE STRUCTURED REPORTS IN ONE WORKBOOK

If a workbook contains multiple reports, then each time the report is refreshed or opened, Atlas will refresh all the

reports in the workbook.

Similarly, if the workbook has a filter in a control sheet, which is used across several reports, then Atlas will refresh all

the reports whenever a filter is changed.

For example, in the attached screenshot we have numerous identical reports, differentiated only by the filter for ‘Item

Group’.

In this case, we would recommend that only one sheet is used in conjunction with an Atlas Lookup for the ‘Item Group’.

Example - Identical Reports in Workbook

Best Practice for Multiple Reports

Our recommendation is not to overly load a single workbook with excessive reports. It may be equally as practicable

to have several reports in different workbooks, rather than accumulating many reports in a single ‘home’ workbook.

Page 11: 8 WAYS TO IMPROVE REPORTING PERFORMANCE62f10e0162f5f0afe756-b636a0949b3e058367a6f2ae35c88177.r63.cf2... · 8 WAYS TO Improve Reporting Performance. D 1 ... Manual Calculation for

D

#8 - CACHING (IN MEMORY PROCESSING)

The Cache function reduces the number of times Atlas requests a dataset from AX, resulting in all aggregation taking

place on the AOS (In Memory Processing).

The benefit is that this reduces both the number of requests on the AOS/ SQL server and the volume of network traffic.

The Cache function only requests the data from AX when the Cache formula is refreshed. Subsequently the data is

returned to the Client, where it is used by the Balance and Column formulae.

Atlas Cache Function

In Atlas the cache function may be used to create an in-memory table that can be consumed by other

Atlas functions (such as Balance or List); as if it was a physical table in the Microsoft Dynamics AX database.

When an entire column varies by a single filter, for example Ledger account, it is a candidate for the Cache

function.

Example - Cache Report

A full worked example of Caching is available in our Advanced Trainee Workbook, which is available on our website:

Sign is as a Partner: www.atlas4dynamicsax.com

Page 12: 8 WAYS TO IMPROVE REPORTING PERFORMANCE62f10e0162f5f0afe756-b636a0949b3e058367a6f2ae35c88177.r63.cf2... · 8 WAYS TO Improve Reporting Performance. D 1 ... Manual Calculation for

D Browse to following folder Resources Training Material Advanced Reporting

Download the Advanced Reporting zipped folder