Dynamically load images to reports based on data from JSON using Expression
Posted: Thu Jan 17, 2019 12:46 pm
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?
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?