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:
- Create a data model that looks like the below screenshot:
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.
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.
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
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
This is a great post - I didn't know about that ask for dimensions parameter. Thank you!
ReplyDelete