我想将我byte array从sql数据库(varbinary)获取的徽标传递给我的stimulsoft报告,使用变量并在标题中的图像组件中显示.
任何人都可以帮忙吗?
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)
| 归档时间: |
|
| 查看次数: |
2179 次 |
| 最近记录: |