从RDLC报告中的Render PDF上不显示Base64图像 [英] Base64 image doesn't display on Render PDF from RDLC report
问题描述
我正在尝试使用RDLC报告中的参数( @CustomerSign
)显示图像(base64字符串)(我正在从报告中呈现PDF文件,而我我看到PDF文件了
我已经配置了如下图像属性:
选择图像来源:数据库
使用此字段:
= Convert.FromBase64String(Parameters!CustomerSign.Value)
使用此MIME类型: image / png
并传递参数:
ReportParameter CustomerSign = new ReportParameter(CustomerSign,obj.SignImage);
rptvw.LocalReport.SetParameters(CustomerSign);
但图片显示红十字 [X]
而不是图像,并没有给出错误!
可能是什么问题?
我也尝试过:如何渲染PNG图像(如内存流)到.NET ReportViewer报表面上
对图像的支持非常有限,这篇MSDN文章讨论了你可以做什么。 / p>
从将报告中嵌入报告不是一个选项的问题看起来有点明显。但是可以指定外部dbase作为源。请注意必须设置的EnableExternalImages属性,如MSDN文章所述。似乎要走的路,问题不够详细,您可能需要在代码中提供包含所需图像的合适表格。
I'm trying to display image(base64 string) using parameter(@CustomerSign
) in RDLC report (I'm rendering PDF file from report and I'm seeing PDF file)
I've configured image property as below:
Select the image source : Database
Use this field :
=Convert.FromBase64String(Parameters!CustomerSign.Value)
Use this MIME type: image/png
And passing parameter:
ReportParameter CustomerSign = new ReportParameter("CustomerSign", obj.SignImage);
rptvw.LocalReport.SetParameters(CustomerSign);
But the image showing red Cross [X]
instead of image, and doesn't gives an error!
What could be the issue?
I've also tried: How can I render a PNG image (as a memory stream) onto a .NET ReportViewer report surface
Support for images is pretty limited, this MSDN article discusses what you can do.
Seems somewhat obvious from the question that embedding them in the report is not an option. But you can specify an external dbase as a source. Beware the EnableExternalImages property you have to set, as documented by the MSDN article. Seems the way to go, the question is not detailed enough, you might have to provide a suitable table with the desired image in your code.
这篇关于从RDLC报告中的Render PDF上不显示Base64图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!