ER - Use horizontally expandable ranges to dynamically add columns in Excel reports- D365FO

 

What's the Problem:



Customer requests for different GL-related reports in which we will surely have Financial dimensions in different columns. For example, one customer asks for financial dimensions like Business Unit, Department, Cost center, etc, others can ask for other financial dimensions to be reflected in the report. Since the financial dimensions are dynamic in nature based on the requirement of customers.

As a consultant, you might require to make changes in the report to show different financial dimensions as per the customer's request. It takes a lot of effort in making changes in the report format, model mapping [I assume you are familiar with Electronic Reporting - Data model, Model mapping, and Format designer]


Here is the solution:

Create horizontally expandable ranges to dynamically add columns in Excel reports in the Electronic reporting. 

Steps to create the report: 

  1. Create a data model that looks like the below screenshot:



2. Click on Map Model to Datasource. Create new model mapping and click designer.


3. Add Table records "LedgerJournaltrans". Bind the Main Account and dimensions with the record list created in step 2. We are binding the Main account and dimensions to both the record list. Record list "Dimension Settings" will be used to create the column names dynamically. Record list "Dimension Values" will be used for showing the Dimension code and its name.


4. Add Financial dimension details option available in Datasource types -> Functions. 
Click Add root and then select "Ask for dimensions" so that it would be available for selection by user at runtime. There are three options for Financial dimension selection. (Explained in the screenshot). There is no need to bind this data source to any data model.


5.
Save the Model mapping and then complete this data model.
6. Create a format based on the data model with Excel format.
7. Download Excel file from Microsoft downloads.




8. Import the excel file in Format designer and it will create Excel cells and ranges based on the Name Ranges defined in the excel file.
9. Add the ranges with horizontal replication.

10. Bind the Format mapping with Format as shown below:


Final Output:

Now it's time to run the report. Complete the above configuration and press on run. Select the desired Financial dimensions that are to be shown in the report. For instance, we selected all available Financial dimensions - BusinessUnit;CostCenter;Department;MainAccount

We get the four columns based on our selection of financial dimensions.



That's it for this blog. See you in the next blog. Please comment if you have any suggestions about use of Horizontal replication.

Happy Learning! 
By Neeraj Kumar

Comments

  1. This is a great post - I didn't know about that ask for dimensions parameter. Thank you!

    ReplyDelete

Post a Comment

You might love these

Run ER reports using Electronic Messaging Functionality in D365

Default descriptions - Dynamics 365 for Finance and Operations Part-01

Bulk Posting of Journals in Dynamics 365 Finance and Operations