Looking for PowerObjects? Don’t worry, you’re in the right place! We’ve been part of HCL for several years, and we’ve now taken the final step in our acquisition journey: moving our website to the HCL domain. Nothing else is changing – we are still fanatically focused on Microsoft Business Applications!

PowerObjects Blog 

for Microsoft Business Applications

|

Solutions for Image Rendering Problems

Post Author: Joe D365 |

So, you're building a custom SSRS report using FetchXML and you have the requirement to display images from Notes in Dynamics 365.

(If you need some initial setup assistance, see one of our previous blogs, Quotes: How to Display an Image Stored in Dynamics 365 on an SSRS Report, for help.)

Now, fast forward to deploying and testing your report within Dynamics 365. If everything looks great except the images didn't render properly, you're probably thinking, "What the heck?!" Perhaps you see a little red X, maybe the image is only half-loaded or pixelated, or it could be a combination of these. Regardless, it's frustrating! Here are a few potential quick solutions for image rendering issues that may be just what you need…

1. Review the header of your FetchXML behind the dataset bringing those images into the report: is distinct="true" in there? If so, this is likely the source of your image rendering problem. Set it to false or, better yet, simply remove the whole condition if you don't need it.

2. When it comes to rendering images nicely, Dynamics 365 has a size limit of 75 KB. It might render an image over 75 KB, but it won't like doing it and it you probably won't like the results! As a safeguard against inadvertently attempting to display an image that exceeds the limit, consider adding a Row Visibility expression to hide an image greater than 75 KB. For example: =IIF(Fields!NOTE_filesize.Value/1024 > 75, True, False) where this would be Set expression for: Hidden.

3. Another solution is to avoid this size limitation altogether by reducing the size of your images within Dynamics 365. Now, there is no way to reduce the size of the original image that is added, but you can trigger a plugin that makes a copy of the image and reduces its size in the process. Most likely, your images are attachments onto Notes, and your plugin can have a logic flow like this:

IF Note contains an image attachment

IF image file size < configurable max value

END

ELSE

- Reduce the quality by configurable percentage and shrink the image (maintaining scale) so the largest side matches the configurable value; repeat if still too big

- Replace original image with newly reduced image

This, along with collaboration of your Row Visibility expression from #2 above, will prevent those big, unwanted images from trying to render and display in your report.

Hopefully these solution(s) help clear up some image rendering issues. Be sure to subscribe to our blog for more Dynamics 365 tips and tricks!

Happy D365'ing!

Joe CRM
By Joe D365
Joe D365 is a Microsoft Dynamics 365 superhero who runs on pure Dynamics adrenaline. As the face of PowerObjects, Joe D365’s mission is to reveal innovative ways to use Dynamics 365 and bring the application to more businesses and organizations around the world.

PowerObjects Recommends