The code I've used to create the resource is
Code: Select all
let report = new Stimulsoft.Report.StiReport();
let companyLogo = new Stimulsoft.Report.Dictionary.StiResource();
companyLogo.name = 'CompanyLogo'
companyLogo.alias = 'Company Logo'
companyLogo.type = Stimulsoft.Report.Dictionary.StiResourceType.Image
companyLogo.content = Stimulsoft.System.IO.Http.getFile("http://dev.mysite.local/style/default/images/logo.png", true);
report.dictionary.resources.add(companyLogo)

However when dragging this image into the designer, the image is not showing in preview or when the report is saved and viewed from the viewer.
If I save the report, then reload it, the image in the editor changes to the following as well:

How can I fix this? Is the code I'm using to generate the resource image correct?