Generate dynamic image in table with "dynamic template smart service"

Hi all,

I am trying to generate dynamically images within a dynamic grid on a Word template with the dynamic template smart service.

The requirement is to have a different image on each row depending on other values of that row (for instance a "Green / Approved" logo, "Red / Rejected" one, etc.

Using a dynamic list of images doesn't work, the list will just get duplicated on each row.

Passing an array of images for the bookmark image in the template row is generating the following error:

freemarker.template.TemplateModelException: Method "public fr.opensagres.xdocreport.document.images.ImageProviderInfo fr.opensagres.xdocreport.document.images.AbstractImageRegistry.registerImage(java.lang.Object,java.lang.String,fr.opensagres.xdocreport.template.IContext) throws fr.opensagres.xdocreport.core.XDocReportException," threw an exception when invoked on fr.opensagres.xdocreport.document.docx.images.DocxImageRegistry object "fr.opensagres.xdocreport.document.docx.images.DocxImageRegistry@3c1f38ae". See cause exception.

The failing instruction:
==> #assign ___imageInfo = ___ImageRegist...  [in template "fr.opensagres.xdocreport.document.docx.DocxReport@5ab2eb91!word/document.xml" at line 4, column 161984]

Does anybody have experience with such case and if so what approach did you used?

Thanks in advance!


 Discussion posts and replies are publicly visible