0
我將收集圖像存儲在數據庫中(創建字段img爲byte []),並且當傳入到stimulsoft報告中時未顯示。 我嘗試在字體[]或圖像中的stimulsoft設計器中創建字段img ...但不起作用。 如何顯示它?來自數據庫的圖像數據未顯示在stimulsoft報告中
var imgConverter = new ImageConvert();
var report = new StiReport();
var t = new DataTable();
t.Columns.Add("Img");
foreach (DataGridViewRow dgv in dataGridViewX3.Rows)
{
t.Rows.Add(
imgConverter.ByteArrayToImage((byte[])dgv.Cells["BarcodeImg"].Value)
);
}
report.Load("BarcodeReport.mrt");
report.RegData("DSBarcode", t);
report.Compile();
report.Show();
請分享一些代碼來說明您的問題。 –