Hin*_*man 12 c# base64 image rdlc dynamic-rdlc-generation
我正在尝试使用@CustomerSignRDLC报告中的参数()显示图像(base64字符串)(我从报告中呈现PDF文件,我看到的是PDF文件)
我已经配置了如下图像属性:
选择图像源:Database
使用此字段:
=Convert.FromBase64String(Parameters!CustomerSign.Value)
Run Code Online (Sandbox Code Playgroud)
使用此MIME类型: image/png
并传递参数:
ReportParameter CustomerSign = new ReportParameter("CustomerSign", obj.SignImage);
rptvw.LocalReport.SetParameters(CustomerSign);
Run Code Online (Sandbox Code Playgroud)
但图像显示红十字[X]而不是图像,并没有给出错误!
可能是什么问题?
对图像的支持非常有限,这篇 MSDN 文章讨论了您可以做什么。
从这个问题来看,似乎很明显,将它们嵌入报告中并不是一种选择。但您可以指定外部数据库作为源。请注意必须设置的 EnableExternalImages 属性,如 MSDN 文章所述。似乎是要走的路,问题不够详细,您可能必须在代码中提供带有所需图像的合适表格。