如何将图像从my.resource显示到rdlc报告? [英] how to display images from my.resource to rdlc report?
本文介绍了如何将图像从my.resource显示到rdlc报告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
i遇到了一个问题,我想显示来自My.resources的图像,我无法将任何非字符串类型传递给报表参数..无论如何要检索任何来自My.resources的路径名?还是其他任何建议?
非常感谢您的帮助!
i已经获得了简单的图片框码
PictureBox1.Image = My.Resources.ResourceManager.GetObject(signa)
怎么样我使用相同的资源在rdlc报告上显示
Hi,
i got a problem in which i wanted to display the images from My.resources and i can not pass any non-string type to the report parameter.. is that anyway to retrieve any path name from My.resources ? or any other suggestion ?
really thank for the help!
i already got this code for simple picturebox
PictureBox1.Image = My.Resources.ResourceManager.GetObject("signa")
how can i use the same resource to display on the rdlc report
推荐答案
<td title="http://localhost:60749/Uploads/Engineers/SignatureFile/5/sample.png" class="a17">
<img alt="http://localhost:60749/Uploads/Engineers/SignatureFile/5/sample.png" src="" />
</td>
var DC = new EPCDataContext();
var parameters = new List<ReportParameter>();
var reportData = DC.tvfGetEAReport();
var siteUrl = "http://" + Request.ServerVariables["HTTP_HOST"].ToString() + "/";
ReportDataSource rds = new ReportDataSource("DataSet1_tvfGetEAReport", reportData);
var siteUrlParam = ReportViewer1.LocalReport.GetParameters().FirstOrDefault(p => p.Name == "SITE_URL");
var parameter = new ReportParameter();
parameter.Name = "SITE_URL";
parameter.Values.Add(siteUrl);
parameters.Add(parameter);
ReportViewer1.LocalReport.SetParameters(parameters);
ReportViewer1.LocalReport.DataSources.Add(rds);
这篇关于如何将图像从my.resource显示到rdlc报告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文