gpt4 book ai didi

c# - RDLC 报告中的渲染 PDF 中不显示 Base64 图像

转载 作者:可可西里 更新时间:2023-11-01 08:28:48 25 4
gpt4 key购买 nike

我正在尝试在 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] 而不是图像,并且没有给出错误!

可能是什么问题?

我也试过:How can I render a PNG image (as a memory stream) onto a .NET ReportViewer report surface

最佳答案

对图像的支持非常有限,this MSDN article讨论您可以做什么。

从问题中可以明显看出,将它们嵌入报告中不是一种选择。但是您可以将外部数据库指定为源。请注意您必须设置的 EnableExternalImages 属性,如 MSDN 文章所述。似乎要走的路,问题不够详细,您可能必须在代码中提供包含所需图像的合适表格。

关于c# - RDLC 报告中的渲染 PDF 中不显示 Base64 图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42020490/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com