如何在RDLC中添加图像. [英] How to Add an Image in RDLC..
问题描述
大家好...
我正在开发一个有关学校管理"的项目,其中生成了许多报告.我正在使用Visual C#,并将.NET Framework 3.5和SQL2005作为后端.
我的问题是,在每个报告的顶部,我必须显示使用函数从数据库中获取的图像(徽标).
我如何在RDLC上显示图像.
如何以编程方式访问RDLC元素?
任何想法或示例代码都可以节省我的时间...
在此先感谢.
欢呼!!!!!!!!!!!
Hi guys ...
I am developing a project on School Management in which there are many reports are generated . I am using Visual C#, with .NET Framework 3.5 and SQL2005 as Back end .
My problem is that on top of every reports i have to show an image(logo) which am fetching from the database using a function.
How can i show the image on the RDLC.
How do i programattically access the RDLC elements ?
Any idea or Sample code will save my day ...
Thanks in Advance .
Cheers !!!!!!!!!!!
推荐答案
请参阅讨论@ ^ ]
它指出,您可以使用Application.StartupPath来获取应用程序启动文件夹的路径,并使用Path类来构建文件的标准路径:
Refer to discussion @ http://www.codeproject.com/Messages/3291203/Dynamic-Image-in-Report-Viewer.aspx[^]
It states that you can get the path to the folder that your app was launched from using Application.StartupPath and build the fully qualified path to your file using the Path class:
string fullPath = Path.Combine(Application.StartupPath, "myfilename.bmp");
这篇关于如何在RDLC中添加图像.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!