Displaying entity image in SSRS report using Power Automate

By | December 15, 2022

In Dynamics 365 CRM, while working on one of our requirements we came across a scenario where we needed to display an Account entity image on an SSRS report. But, due to SSRS limitations, the report did not allow the usage of the OOB “entityimage” attribute in the dataset.

As a workaround we’ve created a Multiline text field and mapped the “entityimage” value (i.e. base64 string value) into that, so we can use that Multiline text field attribute in our dataset in order to display the entity image on the report. Also, to store the actual Entity Image in the custom field we have used the Power Automate Flow.

In this blog, we will go through the steps that need to be performed in order to achieve the requirement as follows:

1. Create a custom Multiline text field on the Account entity

Power Automate

2. Navigate to Power Platform Admin Center -> Open your solution -> New -> Automation -> Cloud Flow -> Automated to create a Power Automate Flow

Power Automate

3. Now add the Microsoft Dataverse Trigger for when a row is added, modified, or deleted and set the change type to Modified and set the Select Columns value to “entityimage”

Power Automate

4. After that add another step (“Get row by ID”) in order to retrieve the account entity image and only retrieve the Entity Image field

Power Automate

5. Now add the condition to check if the Default image (i.e., entity image) contains data

Power Automate

6. Then under the “YES” condition add the action to retrieve the records and update them

7. In the Table name section, select the Entity/Table name on which flow needs to be run (Executed)

Row Id is a unique identifier of the Entity/Table

The select columns option is for filtering columns (i.e., to retrieve specified columns)

Power Automate

In the update step we’ve set the EntityImage value to the Multiline text field (which we had created in Step 1)

Power Automate

Power Automate

8. Under the “NO’’ condition we’ve set the Multiline text field (which we had created in the 1) to Null

Power Automate

Power Automate

9. Now in the SSRS report we’ve added our Multiline text field to our dataset fetchxml and mapped that Multiline text field value to our image

Power Automate

Power Automate

As a result, we are able to see the image on the report in the following manner-

Power Automate

Conclusion

Thus, in this way, we can display the Entity Image for any of the entities on the SSRS report in Dynamics 365