Dynamically load images to reports based on data from JSON using Expression

Stimulsoft Reports.JS discussion
Post Reply
csrt
Posts: 49
Joined: Thu Jan 17, 2019 12:38 pm

Dynamically load images to reports based on data from JSON using Expression

Post by csrt »

Hello, I am trying to dynamically load images using as an Expression a function written by me, and imported to Dictionary.

The expression is {imageToReport(root.docid)}

If the function gives a synchronous return - it works just fine: Stimulsoft.Base.Drawing.StiImageConverter.stringToImage(src). In this case the variable "src" contains the base64 string of the image. So the report displays the images.

But when I am trying to get the image async from server, the render of the report seems to happen before the function returns the stringToImage(src).

I am using report.renderAsync() function. Any ideas what I am doing wrong?
Lech Kulikowski
Posts: 6237
Joined: Tue Mar 20, 2018 5:34 am

Re: Dynamically load images to reports based on data from JSON using Expression

Post by Lech Kulikowski »

Hello,

Please send us a sample project which reproduces the issue for analysis on support@stimulsoft.com

Thank you.
Post Reply