Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ajax/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Image SSRS表单元中的多幅图像_Image_Reporting Services_Ssrs 2008 - Fatal编程技术网

Image SSRS表单元中的多幅图像

Image SSRS表单元中的多幅图像,image,reporting-services,ssrs-2008,Image,Reporting Services,Ssrs 2008,我正在SQL Server Reporting Services中使用表。我正在从数据库中获取一个数据表。数据表有三列。其中一列的图像名称用逗号分隔 数据表: Type Status Images 1 1 one.jpg,two.jpg,three.jpg 2 2 four.jpg,two.jpg,seven.jpg 3 1 one.jpg,six.jpg 我在SSRS表中显示这三行。如何按行单元格显示图像?动态将图像添加到

我正在SQL Server Reporting Services中使用表。我正在从数据库中获取一个数据表。数据表有三列。其中一列的图像名称用逗号分隔

数据表:

Type  Status  Images
 1      1      one.jpg,two.jpg,three.jpg
 2      2      four.jpg,two.jpg,seven.jpg
 3      1      one.jpg,six.jpg

我在SSRS表中显示这三行。如何按行单元格显示图像?

动态将图像添加到SSRS报告并不像动态更改或隐藏图像那样容易。因此,我想到了两种方法

如果图像的顺序不需要更改: 将所有需要的图像放入单元格中。设置每个图像的可见性公式,以检查字段中是否列出了相应的图像

=IIF(INSTR(Fields!Images.Value, "one.jpg") > 0, false, true)
如果订单需要与SQL表中的订单匹配,则使用另一种方法:

写一些将逗号分隔的字符串分开,返回元素x。 将一组图像添加到相应的单元格中。然后设置每个的Image属性以调用自定义代码。例如,第一个的图像属性可能是:

=Code.GetImageName(Fields!Image.Value, 1)
第二个是

=Code.GetImageName(Fields!Image.Value, 2)