如何从资源文件映像更改RDLC报告映像 - 在运行时? [英] How to change the RDLC Report Image from Resource file images - During Runtime?

查看:61
本文介绍了如何从资源文件映像更改RDLC报告映像 - 在运行时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VS2010有一个小项目。使用我的RDLC报告,我使用名为Image4的Image Control,我在我的资源文件中添加了3个图像[resx]



Hi, I have a small project in VS2010. With my RDLC Report, I am using Image Control called - Image4 and I added 3 Images to my resource file [resx]

static Reflection.Assembly pxAssembly = Reflection.Assembly.GetExecutingAssembly();
static String pxResName = pxAssembly.GetName().Name + ".ImageResources";
static ResourceManager s_pxResourceManager = (new Resources.ResourceManager(pxResName,pxAssembly));
static System.Drawing.Image MyLogoImg1 = (safe_cast<System.Drawing.Image>(s_pxResourceManager.GetObject("Logo_S1")));
static System.Drawing.Image MyLogoImg2 = (safe_cast<System.Drawing.Image>(s_pxResourceManager.GetObject("Logo_P1")));
static System.Drawing.Image MyLogoImg3 = (safe_cast<System.Drawing.Image>(s_pxResourceManager.GetObject("Logo_C1")));





我希望在运行期间根据我的字段值更改Image4 ...是否可以?





I wish to change the Image4 according to my field value during runtime...Is it possible?

Image4.Value=IIf(First(Fields!company_name.Value, "DataSet1").ToString().Trim().Contains("C.N"), ? , ? )



感谢帮助


Thanks For The Helps

推荐答案

这篇关于如何从资源文件映像更改RDLC报告映像 - 在运行时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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