rdlc 添加动态图片的问题

qinchengtim 2010-03-15 11:07:18
在rdlc上面放一个 image控件,然后 把属性里面的 Source 设置成External,
Vaule设置成参数的值 ‘=Parameters!image.Value’
        ReportViewer1.LocalReport.EnableExternalImages = true; 
string path ="file:///"+ Server.MapPath("~\\Upload\\Sunset.jpg");

ReportParameter para= new ReportParameter("image", path);

ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { para});

为什么这样做了之后,错误提示:
“图像“image1”的 Value 表达式引用的报表参数“image”不存在。”
...全文
456 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
A1027 2010-05-20
  • 打赏
  • 举报
回复
菜单-->报表-->报表参数(新增一个参数,比如名称为image,类型为string)

通过在rdlc报表中新增参数,参数名称必须和 ReportParameter para= new ReportParameter("image", path);
中的第一个参数一样

具体参见:http://hi.baidu.com/jameshappyvip/blog/item/e5645dee4a92ca4379f055c2.html

4,818

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 图表区
社区管理员
  • 图表区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧