We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

Exported reports does not show added images

Answered
Subodh Singh Dongol asked on February 9, 2022

Hello,
We have a use-case to show images in Flexmonster table. I was able to show/add images in flexmonster table using the provided example: https://jsfiddle.net/flexmonster/6shdmx9u/ that is in the website. Our use-case is to show images itself, represented as a base64 data URI; we will not be replacing the underlying values with images like in the example. Using the example, we are able to show images in Flexmonster table without any issue. 
But the problem is when we export the said report using flexmonster's export functionality (eg: an excel export) the images do not show up in the exported file. All the cells that should have images are either blank/empty or shows html tags like <img src=...>.
So, I am reaching out to see if there's a work around or solution that will let us showcase the added images in exported files like we see in the flexmonster table UI.
We are mainly looking for a solution/workaround if any, for print, excel, and pdf exported types
Thank you. 

1 answer

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster February 10, 2022

Hello,

Thank you for reaching out to us.

Kindly note that Flexmonster does not export images added by customizeCell. Since every cell's style can be unique when using customizeCell - such a function would take a lot of time. Therefore, an export report with customized cells is impractical because it would last much longer. 
We suggest you a workaround for the reports with images in value cells. There is a useCustomizeCellForData property export which allows enabling and disabling customizeCell formatting for data cells. If you set the useCustomizeCellForData property to false in exportTo() API call, as follows: 

flexmonster.exportTo('excel', {useCustomizeCellForData: false});

then the Excel file will contain the underlying data in value cells.
Here is a JSFiddle sample: https://jsfiddle.net/flexmonster/38Lqymzp/
 
Feel free to contact us if other questions arise.
 
Kind regards,
Nadia

Please login or Register to Submit Answer