public Image BytesToImage(Byte[] buffer)
{
var ms = new MemoryStream(buffer, 0, buffer.Length); return Image.FromStream(ms);
}
private void Text26_BeforePrint(object sender, EventArgs e)
{
DataSourceBase ds = Report.GetDataSource("subDataTable"); ds.Init();
while (ds.HasMoreRows)
{
// get the data column value from the current row
string imgName = (string)Report.GetColumnValue("subDataTable.IMGNAME"); if(imgName=="img2")
{
Picture2.Image= BytesToImage(Convert.FromBase64String(Report.GetColumnValue("subDataTable.检测图片").ToString())) ;
}
// do something with it...
s+=imgName+",";
// go next data row
ds.Next();
}
}