我正在尝试使用@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]而不是图像,并没有给出错误!
可能是什么问题?
是否可以System.Drawing.Image在RDLC Image控件中使用?我读过的只有3种方法:
谢谢谢谢.
编辑:从.NET或C#库继续CGM(计算机图形图元文件)格式?我现在得到System.Drawing.Image格式的图像,并希望将其显示为报告的一部分(作为图像)---这就是我想要做的.
使用visual Studio ultimate 2012.
我正在构建一个要在报表查看器中打印的报表.到目前为止,我有一堆文本框,通过参数从我的表单文本框中获取其值.
到目前为止一切正常.
然后我遇到了一个重大问题.如何将图像从我的表单上的图像传递到报表上的图像?1数据预先存在于数据库中我相信我可以作为参数调用图像(不确定).更大的问题是另一个形象.
另一个图像使用生成QR图像的外部API.此图像在运行时显示在我的表单上的图片框中.我没有将图像保存在我不想要的任何地方.但我明白我是否需要.有什么办法我可以将QR图像从我的表格上的图像框传递到我的报告图像框吗?
更新继承错误的代码:
Microsoft.Reporting.WinForms.ReportParameter rpIMG1 = new Microsoft.Reporting.WinForms.ReportParameter("paramQRimg", base64String);
Microsoft.Reporting.WinForms.ReportParameter rpIMG2 = new Microsoft.Reporting.WinForms.ReportParameter("paramQRMi", "image/png");
reportViewer1.LocalReport.SetParameters(new Microsoft.Reporting.WinForms.ReportParameter[] { rp1, rp2, rp3, rp4, rp5, rp6, rp7, rp8, rp9, rp10, rpIMG1, rpIMG2 });
Run Code Online (Sandbox Code Playgroud)
设置参数部分出错是它所说的全部:
An error occurred during local report processing.
Run Code Online (Sandbox Code Playgroud)
不知道为什么它不喜欢这个