I've tried this:
1) In the dictionary I create a new variable (image type) called "Logo"
2) In the .mrt report I insert an image an set its source to an "Expression":
Code: Select all
{Logo}
Code: Select all
var fi = env.ContentRootFileProvider.GetFileInfo($@"\Images\logo1.png");
if (fi.Exists)
{
FileStream stream = new FileStream(fi.PhysicalPath, FileMode.Open, FileAccess.Read, FileShare.Read, 4096, true);
report.Dictionary.Variables["Logo"].ValueObject = Image.FromStream(stream);
return StiNetCoreReportResponse.ResponseAsPdf(report);
}
else return BadRequest();
Thanks in advance