Display images on SSRS reports in Dynamics 365 for Finance and Operations

There are scenarios which require to print images on SSRS reports in Dynamics 365 for Finance and Operations. How you will achieve this depends on where the images are stored.

Let’s say that you need to display product images on the Sales Order Confirmation or Sales Quotation report, to make it look more appealing. In this case the item (i.e. product) images are stored in the database, as Attachments (DocuRef) of the EcoResProductImage table.

To print the listed product images on Sales Order Confirmation you will need to take the following steps:

  1. In the report temporary table add a new field ProductImage of type container (or the Bitmap extended data type).
  2. Extend the report DP class (SalesConfirmDP) with the X++ code which fills the new ProductImage field with the image retrieved from the EcoResProductImage table.

    The DocGlobalHelper::convertFromBase64String() method looks like this:

    And the DocGlobalHelper::convertBytesToContainer() method looks like the following:

  3. Use the new field in the report design with the Image design element:

How to use images in your reports with Docentric

You can easily use images in a Docentric design by using the similar code but customizing the report’s Docentric DSP class instead.

Remember, you don’t have to introduce a new field on the report temporary table nor to extend the report DP class. Just put the following code in your Docentric DSP class, within the addDataFieldsForRdpTableRecord() method.

After you generate your DDSP file using the changed Docentric DSP class you will be able to design beautiful sales order confirmations or quotes with product images, directly in MS Word using Docentric Designer.

Your designing efforts will result in quite amazing public facing documents :).

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Docentric respects your privacy. Learn how your comment data is processed >>