Recently I have tried to export the entity image of multiple records out of the Dynamics 365 online organisation. As everybody knows by now, this is near impossible, unless you write a SRSS FetchXML Report. But you do have to keep some restrictions in mind which are nowhere clearly defined.
My guide… the internet!
The blogpost “How to Display Image from Dynamics CRM Online in SSRS FetchXML Report” guided me in my efforts to export the entity images from the Dynamics organisation into a Word document. The ‘final solution’ offered by Mahesh Wankhade will help you in your efforts, but he fails to mention 2 important restrictions.
The solution by Mahesh:
- Attach image to note.
- Create dataset in FetchXML to retrieve notes with images.
- Drop image control on SSRS report.
- Set source as Database.
- Set MIME type as per your requirement. (PNG,JPG etc..)
- Deploy and execute report in CRM online.
Restrictions which are missing in the post
50 KB is the maximum limit!
In Mahesh’ case, he only exported one entity image from the system. In my case, I was trying to exporting multiple entity images (as I was exporting multiple records). This created a problem as some images were exported and others were not. With trial and error my colleague Kevin found out that the images are exported, unless they are bigger than 50 KB ! 49,9 KB does not form a problem, but try exporting 50,1 KB and your image will not show up. Kudos to you Kevin!
MIME type matters or doesn’t it?
Mahesh used a MIME type of image/png. The report builder is very strict about this as you cannot use multiple MIME types and I have not found a workaround for this. It is required of you to pick one type. But strangely enough, I used MIME type image/png, and some image of the type ‘jpg’ also showed. If somebody knows the cause or a solution for this strange behavior, do reach out!