如何使用列表控件隐藏RDLC报告中的重复图像 [英] How can i hide the repeated Images in RDLC Report using List Control

查看:183
本文介绍了如何使用列表控件隐藏RDLC报告中的重复图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了Windows应用程序,在这个应用程序中我使用RDLC报告作为一部分。这里我使用RDLC报告中List控件内的Image控件绑定图像。 Bindingsource可能包含重复图像或不同图像,是否可以阻止列表中图像控件中的重复图像。所以任何人都可以建议我如何在列表中绑定不同的图像。



预先感谢



Mohan G

I have Created windows application, in this application i am using RDLC Report as a part. here i am binding images using Image control inside the List control in RDLC Report. The Bindingsource may contain Repeated images or Distinct Images, is it possible to block repeated image in Image Control inside the List. So can any one suggest me how to Bind distinct image in List.

Thanks in Advance

Mohan G

推荐答案

我怀疑你是否可以通过报表表达式自动完成,所以我这样做:



1.在显示报告之前,我会通过VB或C#代码从数据库中获取数据



2.然后,我会尝试清理那些重复的图像。问题是你怎么知道图像已经设置到另一行???您的图像是存储为文件路径还是URL?或者它们是否以二进制形式存储?

如果是第一个,则确定重复很简单;后来即二进制图像几乎不可能获得。



3.所以你通过生成或分配空白图像文件来清理那些重复的图像



4.当您准备好数据源时,然后通过代码将其重新绑定到报告中并通过reportviewer显示
I doubt you can do it automatically through a report expression so I'd do this:

1. I'd get the data from the db through VB or C# code before displaying the report

2. Then, I'd try to "clean" those repeated images. Problem is how do you know that an image is already set to another row??? are your images stored as a file path or URL? or are they stored as binary?
If the first one, then it's simple to determine repetitions; the later i.e. binary images is almost impossible to get.

3. So you clean those repeated images by generating or assigning a blank image file

4. when you got your data source ready, then you re-bind it to your report through code and display it through reportviewer


这篇关于如何使用列表控件隐藏RDLC报告中的重复图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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