使用变量将byte []传递给stimulsoft以在图像上显示

Kūr*_*osh 2 c# wpf stimulsoft

我想将我byte arraysql数据库(varbinary)获取的徽标传递给我的stimulsoft报告,使用变量并在标题中的图像组件中显示.

任何人都可以帮忙吗?

Kūr*_*osh 6

byte[] ImageByteArray = ReadLogoFromSqlDataBase();
MemoryStream ms = new MemoryStream(ImageByteArray);
System.Drawing.Image image = System.Drawing.Image.FromStream(ms);

StiReport rpt = new StiReport();
rpt.ReportFile = "rpt1.mrt";
rpt.Dictionary.Variables.Add("Logo", image);
rpt.Design(); or rpt.Print();
Run Code Online (Sandbox Code Playgroud)