在数据库的Report.rdlc文件上显示图像 [英] Display Image on Report.rdlc file from database

查看:114
本文介绍了在数据库的Report.rdlc文件上显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个Windows应用程序,并希望在图像控件上的report.rdlc文件上显示图像。我将图像上传到项目文件夹并将图像路径保存到数据库中!图像属性设置为外部

而不是图像显示红十字会

我怎么能这样做?



请帮助我?

I creates a windows application and want to show image on report.rdlc file on image control. I upload the image into project folder and save path of image in to database! the Image Property is set to External
Instead of image it showing red Cross
How i can do this?

Please Help me?

推荐答案

在报告中创建参数说 ImagePath



对于报告集中的图像控件以下值。



值=参数!ImagePath.Value

来源=外部





显示报告时,将 ImagePath 参数设置为



ReportParameter [] param = new ReportParameter [1];



Create a Parameter in the Report say "ImagePath"

For the Image control in report set following values.

Value=Parameters!ImagePath.Value
Source=External


When displaying report set the ImagePath parameter as

ReportParameter[] param = new ReportParameter[1];

string strImagePath = @"file:///" + "C:\MyImages\pic.jpg";
                param[0] = new ReportParameter("ImagePath", strImagePath );
                rptViewer.LocalReport.SetParameters(param);





照常做其他事情。



-praveen。



do other stuff as usual.

-praveen.


这篇关于在数据库的Report.rdlc文件上显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆