C# 将字节[]作为参数传递给rdlc

C# 将字节[]作为参数传递给rdlc,c#,report,C#,Report,我在rdlc文件中有一个图像字段 图像从sql数据库中获取,然后将该数据表(dtIssueStationeryDetailsEntity)传递给myreportview类 然后将datatable指定给reportViewer的datasource属性 ReportDataSource datasource = new ReportDataSource("DataSet2", dtIssueStationeryDetailsEntity); this.reportViewer1.LocalRep

我在rdlc文件中有一个图像字段

图像从sql数据库中获取,然后将该数据表(dtIssueStationeryDetailsEntity)传递给myreportview

然后将datatable指定给reportViewer的datasource属性

ReportDataSource datasource = new ReportDataSource("DataSet2", dtIssueStationeryDetailsEntity);
this.reportViewer1.LocalReport.DataSources.Add(datasource);
我的问题是->图像未绑定到字段。如何装订

获得的输出为:空图像字段

我的Rdlc文件:

我创建了一个数据集-->具有字段->签名(数据类型字节[])-->此数据集签名属性映射到rdlc文件中的图像字段

=First(Fields!Signature.Value, "DataSet2")
注意:

1.MIME类型也为image/jpeg tryed image/png


2.(在数据集中)我还尝试将Signature属性的数据类型更改为System.GUID,System.Object。

然后将其转换为图像而不是字符串。@Patrickhoffman rdlc中参数的数据类型为字符串。因此,如果您看到代码,我必须再次将图像转换为字符串,您将如何将图像转换为字符串?@PatrickHofman 1-->从db 2中获取字节[]->将字节[]传递给MemoryStream 3-->将值分配给datatable。4) -->parameters.Add(新的ReportParameter(“Signature”,Convert.ToString(dtIssueStationeryDetailsEntity.Rows[0][“Signature”]));