Can Paginated Reports ease Dynamics 365 FO report development?

Dynamics 365 Finance and Supply Chain Management uses SQL Server Reporting Services for reporting and document generation. In 2022 Microsoft included SSRS (aka. Paginated Reports) in PowerBI Pro license. One may ask if it is possible to use PowerBI Paginated Reports as well for reporting purpose in Dynamics 365 F/SCM.

X++ SSRSPowerBI Paginated Reports
+ Direct access to transaction DB
+ Business logic in X++
+ Integrated with Dynamics 365 FO

– Complex development
– Embedded in Dynamics 365 FO deployment cycle
+ Simple development using Report Builder
+ Integrated with Business Intelligence
+ Reuse existing data models

– Limited development possibilities
– No direct data access
Pros and Cons for Paginated Reports
SSRS vs. Paginated Report
Side-to-side comparison SSRS X++ report vs. PowerBI Paginated Report

Data Access

Paginated reports in PowerBI have only a limited capability to access data. There is no Dynamics 365 FO connector or OData access to entities. You could use different approaches to get Dynamics 365 FO data.

Access data from Paginated Reports

Development

Paginated reports are designed by using the Report Builder. It is an adapted version of the SSRS Report Builder with some more data access features. In theory you could develop an SSRS report using Visual Studio and upload the .RDL file. However, PowerBI Paginated Reports are a limited version of SSRS and you might get errors.

Paginated Reports - Report Builder for PowerBI

Fazit

Paginated Reports are a reduced SSRS feature in PowerBI. The Report Builder is very limited. You can define data access, defined parameters and place data on the report sheet. If you want to create printable documents without real-time requirement the Paginated Reports may be an option for you.

How to use Dynamics 365 SCM Product Categories in PowerBI

Recently we had the requirement to use the product categories from Dynamics 365 Supply Chain Management in a PowerBI report as well. It should be used to filter products by categories and sub-categories. We were using Data Lake export in D365 FSCM.

This is how product category hierarchy looks like in Dynamics 365 SCM:

Dynamics 365 FSCM: Products by Category
Dynamics 365 FSCM: Products by Category

This is how it should look in PowerBI:

Data sources

To build a product category model in PowerBI some tables need to be exported:

  • EcoResCategoryHierarchy
  • EcoResCategory
  • EcoResProductCategory
  • EcoResProduct

Load and model the category hierarchy data

Start with EcoResCategory table. I’d recommend to remove all unnecessary fields and keep at least RecID, Name and ParentCategory.

EcoResCategory table in PowerQuery editor

The field ParentCategory is a reference to the RecID of the parent line. In theory this would be sufficient to build the hierarchy in PowerBI. In practice we want to create the hierarchy via the name, not the RecID. Create a copy of the table and remove all fields except the Name and RecID. I call the new table EcoResCategoryName:

A duplicate of EcoResCategory with RedID and Name

Create an outer join from the original table to the new EcoResCategoryName table via the ParentCategory to the RecID.

Left Outer Join from EcoResCategory to the Name table to get the parent name

As result the Name of parent is now part of the table. For example the parent of PC&Tablet is Lenovo Sales. and the parent of Server as well as the parent of Storage is Server & Storage.

Category with name and parent name

Safe and load the data.

Build the Hierarchy

In PowerBI you can use the DAX formula PATHITEM to identify a certain element within a hierarchy. You have to provide the PATH (i.e. Name and ParentName) how the hierarchy is linked. For example to get the first level hierarchy element use the following code:

Level1 = PATHITEM(PATH(EcoResCategory[Name],EcoResCategory[ParentName]),1)

In my example “Lenovo Sales” is a root element for my hierarchy. The other root elements like “Neue Kategorie” and “Elektro Geräte” belong to another hierarchy (see CategoryHierarchy field). My hierarchy has 3 levels, therefore I create 3 additional fields called Level1, Level2, Level3.

Level2 = PATHITEM(PATH(EcoResCategory[Name],EcoResCategory[ParentName]),2)
Level3 = PATHITEM(PATH(EcoResCategory[Name],EcoResCategory[ParentName]),3)
Use PathItem() to identify Level1, Level2, Level3 elements

To create the hierarchy in PowerBI right click on the Level1 field and select create hierarchy. Right click on Level 2 and choose “Add to hierarchy”. Do the same with Level 3. Your hierarchy should look like this:

Hierarchy in PowerBI

Create the PowerBI data model

To implement a report like in Dynamics 365 SCM, load 3 additional tables:

  • EcoResCategoryHierarchy
  • EcoResProductCategory
  • EcoResProduct

Link the EcoResCategoryHierarchy.RecId to EcoResCategory.CategoryHierarchy
Link the EcoResCategory.RecId to EcoResProductCategory.Category
Link the EcoResProductCategory.Product to EcoResProduct.RecId

In my example the relations look like this:

PowerBI data model for Dynamics 365 SCM product category hierarchy

Add visuals to the report

I’ve added 3 visuals to the report. First, a filter element to choose from the EcoResCategoryHierarchy. For example the “Lenovo” hierarchy consisting of Laptops, Servers and Storage products.

Next a filter element for the hierarchy that was created earlier. PowerBI presents the hierarchy in a drop down tree. To avoid “Blank” elements in the hierarchy create a visual level filter and exclude the blanks

exclude blank values from the hierarchy using a visual level filter

My third visual is a table containing the product. The products get filtered based on the selection of the hierarchy elements.

Final report with hierarchy and products

Custom Scripts: Run X++ Code without downtime (Video)

Custom Scripts in Dynamics 365 Finance and Supply Chain Management enables you to upload and execute X++ Code without the need to deploy a new release. Custom Scripts serve the same purpose like X++ Jobs in AX 2012 and earlier versions e.g. data correction. This short video shows how to create such a custom script, upload and execute it in a Dynamics 365 FO instance:

Custom Scripts: Jobs are (almost) back with in 10.0.27

The Custom Scripts feature in Dynamics 365 Finance and Supply Chain Management allows you to upload and execute code snippets. Microsoft implemented some barriers because this feature is potential dangerous. You need two accounts, one for uploading the script and one for approval. The feature can be found in System Administration > Periodic Tasks > Database > Custom scripts.

Custom Scripts Feature in 10.0.27

How to create PowerBI Scorecard based on D365FO data

PowerBI goals are used to keep track of targets like sales quantity, quality, etc. Goals can be linked to values from PowerBI reports. This video shows how to create a scorecard with goals based on Dynamics 365 Finance data.

Admin Provisioning Tool Error: The value’s length for key ‘password’ exceeds it’s limit of ‘128’

Microsoft has recently released the new VHD for Dynamics 365 Finance and Operations 10.0.24 to download from LCS. When you instantly try to execute the Admin Provisioning Tool and provide your domain user you will get an error.

The value’s length for key ‘password’ exceeds it’s limit of ‘128’

There are some steps required before you can assign it to your Domain:

  1. Go to https://portal.azure.com > Active Directory > App Registration and register a new App
Register a new application in Azure Active Directory
  1. Provide the One-Box URL as reponse address
  2. Copy the AppID to your clipboard
App Registration for Dynamics 365 FO 10.0.24 One-Box Environment
  1. Execute the “Generate Self-Signed Certificates” PowerShell script from the Desktop
  2. Provide the AppID from the App Registration
Generate Self-Signed Certificates

6. Execute the Admin Provisioning Tool and provide your Domain account address
7. Open https://usnconeboxax1aos.cloud.onebox.dynamics.com/ in Edge and login

Dynamics 365 Finance and Operations 10.0.24 One-Box Environment

Store Dynamics 365 F/SCM Attachments on SharePoint

Dynamics 365 Finance & Supply Chain allows you to store attachments in the database, on Azure BLOB and on SharePoint. See here how you can configure SharePoint as storage location and create a document type “Fact Sheet”:

Dynamics 365 FO – New Grid Control in Action

New Grid control in Dynamics 365 Finance & SCM

The new grid control in Dynamics 365 FO comes with some cool new features. Watch the video on my YouTube channel to see it in action.

  • Copy&Paste data from Excel into Dynamics 365 FO
  • Faster data entry due late field validation
  • Easily Drag&Drop reorder columns
  • Pin columns on the left while scrolling
  • Use formulas in numeric fields
  • Calculate totals for numeric fields

How to choose the right BI and reporting strategy for Dynamics 365 Finance

Dynamics 365 for Finance and Supply Chain Management offers a broad range of reporting and business intelligence options. You can utilize the integrated Power BI dashboards, link the Power BI report gallery within Dynamics, use integrated SSRS reports or develop Power BI reports and dashboards that connect to Dynamics 365. Sometimes it can be hard to decided which one to choose. Here is a guideline which one to choose depending on the reporting requirements.

Dynamics 365 Power BI and Reporting strategy

Decision Tree for Power BI / Reporting in Dynamics 365 Finance & SCM

Report Format:

What is the purpose of the report? Is it an interactive report / dashboard or is it a static list or document like artifact? For example, sales analysis is typical an interactive report while a collection letter is a printed document. Power BI is great for interactive data analysis, SQL Server Reporting Services (SSRS) is the right tool for lists and page oriented printable documents.

Real Time:

Do you need to see transactional data as soon as it is generated in Dynamics? For example posting and invoice and immediately printing the document. If so, you need to access the transactional database (AxDB). There are two ways: Use integrated Reporting Services or query entities via OData. However, using entities allows you to access the AxDB but Power BI doesn’t support Direct Query mode for OData, i.e. you have to hit refresh in order to get the latest data.

Multiple data sources:

Is Dynamics 365 Finance the only data source for your report, or do you need to integrated external data sources as well? An example could be to develop a revenue analysis which includes actual sales data from Dynamics 365 as well as demographics and household income. Integrated Power BI dashboards in Dynamics 365 use direct query to access the AxDB and cannot integrate other data sources. It is also not recommended to load external data into Dynamics 365 AxDB because you have a limited cost free database size in your subscription. Additional SQL storage has to be paid.

Additional licenses:

Dynamics 365 Finance and Supply Chain Management includes the rights to view the integrated Power BI dashboards. No additional Power BI license is required. Reports developed using the integrated SQL Server Reporting Services technology are also covered by the Dynamics license. External Power BI reports, dashboards and paginated reports require additional Power BI licenses. At least Power BI Pro for reports and dashboards, Power BI Premium Capacity or Premium per User for paginated Reports.

Examples:

An interactive custom Power BI Report viewed in Dynamics 365 Finance via the users Report Catalog option

Production Performance is part of Dynamics 365 Finance & SCM and directly connects to the entity store (aka. AxDW)

A paginated report in Power BI (Premium)

A static SSRS paginated report in Dynamics 365 Finance and SCM

Conclusion

Before you start working with a certain product, make sure to understand the requirements. Identify the data sources and how to access them. Then choose the right tool for the job. Don’t try to make a printable Power BI or fancy SSRS. By leveraging the full reporting and BI potential you can deliver a great user experience that adds value to Dynamics 365 Finance and SCM.

Use Data Entities in Dynamics 365 Finance & SCM to expose Business Logic

Entities in Dynamics 365 Finance & Supply Chain are not only good to access data. Entities can also be used to execute X++ business logic from 3rd party applications like Power Automate.

For example a table contains shipping carrier records. A Carrier has a Name and Description. The name is the primary key. The combination of Name and DataAreaId makes a record unique at the database.

Carrier Table

There is also an entity to access the data.

Carrier Table Entity

An Action is a piece of X++ logic exposed via entity. This example sets the Carrier as default value for a customer:

public class DMOCarrierTableEntity extends common
{
/// Set as default
/// Customer Account
[SysODataActionAttribute('SetDefault', true)]
public void approve(CustAccount _custAccount)
{    
    ttsbegin;
    CustTable custTable = CustTable::find(_custAccount,true);
    custTable.DMOPreferredCarrier = this.Name;
    custTable.update();
    ttscommit;
}

Such an action can be called via Power Automate:

Call custom action via Power Automate