Dynamic images not displaying in reports

Hi there,

I’ve been trying reporting with BIRT but I’ve run into issues where I can’t seem to get any dynamic images to display in the report. The essence of the problem is that when I insert a dynamic image in a report, I always get a box with a red cross in it.

Even if I use some of the KNIME tutorial workflows such as “Chemical report example”, without any modification this still happens (see image below).

Data table has an image of a molecule but I get this box this a red cross:

Report should display the molecule image:

If I setup a simple report with image to report, the same thing happens. I’ve tried quite a few things already including:

  • Different machines with KNIME (versions from 4.5-4.7)and the report design extension installed

  • Different image types, sizes, etc

  • Embedding images works just fine in reports

Does anybody have an idea why this is happening? I assume this is a “me” issue as I don’t find any other posts complaining about this. I’ve got the right extension installed but perhaps I’m missing another step.

Cheers,
Andrew

Hi @aseeber,

Please follow the instructions provided in this post and let me know if it works fine:

1 Like

Thanks @armingrudd, I was actually using your “Showcase Dynamic Image Problem”, workflow already to see if I was crazy. Unfortunately, I still get the box with a cross.

Here’s some images of the setup. Maybe there is something you see that I’m doing wrong here:

Input data

Image binding setup

Hi @aseeber

I believe the problem here is that “Molecules” are not images even if they are rendered as images in tables by several different KNIME plugins such as CDK and RDKit. Before transfering them to your report, I would recommend to add a column with true molecule images obtained from the node -Renderer to Image-, as follows:

For instance here, the “SMI Canonical SMILES” column are not images but smiles. However, the “PNG …” column generated from them, are PNG image that one can integrate in a BIRT report.

The -Renderer to Image- node is explained here:

Another alternative is to use the -RDKit Molecule to SVG- node to convert molecules into a SVG format:

Hope this helps.

Best
Ael

1 Like

I just read your post a few more times, and the more I read, the more I get this feeling that your issue is not that you don’t have the images in the exported PDF but it’s the image preview in the report designer.
Is that right?

If that’s the case, it’s the way it is, when you use dynamic image, it appears like this in the report designer but in the exported version of the report, you will have the image(s). Would you confirm that by generating a PDF export of your report please?

And if that’s not the case, please continue with @aworker’s solution here and let’s see if it solves the problem.

2 Likes

@aworker thanks for the suggestions. I tried with other real images and it also gives the same problem though you did answer a bunch of my unasked questions about chemical structures!

@armingrudd You are exactly right, thank you! It seems that it is only the preview image that is disrupted, the actual final report PDF is completely fine. I never got to that stage since I got hung up on not seeing the real image in the designer.

I think this solves my issue generally. I still don’t understand why the preview doesn’t show up but it’s not too important for my work flow.

3 Likes

First of all, I have to say this is how BIRT behaves and I’m not a contributor to the project so what I say here is out of my own opinion. But maybe it can be explained like this:
When you use an embedded image or an image from the shared resources, it’s a single image like a constant value. But when you use the dynamic image option, it’s a variable which is provided in the bound dataset.

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.