ReportViewer tablix如何动态显示或隐藏图像 [英] ReportViewer tablix how to dynamically display or hide an image
问题描述
我有一个报告,根据存储过程显示一组行。 我想根据数据行中的值在其中一列中显示或隐藏图像。 (如果附件指示符= Y"我想在其中一列中显示一个纸夹
图像;否则我想隐藏图像或显示空白图像。)
I have a report which displays a set of rows based on a stored procedure. I would like to display or hide an image in one of the columns based on a value in the data row. (If the attachment indicator = Y" I would like to display a paper clip image in one of the columns; otherwise I would like to hide the image or display a blank image.)
我已将报纸图像设置为报表中的嵌入图像,但我不知道如何在列的表达式中引用它。
I have set up the paper clip image as an embedded image in the report, but I do not know how to refer to it in the expression for the column.
任何人都可以协助我这个? 谢谢。
Can anyone assist me with this? Thanks.
推荐答案
我玛丽,
您可以使用外部图像设置值 :
you can use external image set the value :
=" file://" +字段!m_Image1Path.Value
="file://" + Fields!m_Image1Path.Value
或您可以设置嵌入的图像值:
=字段!nameImgEmbedded
=Fields!nameImgEmbedded
其中nameImgEmbedded包含嵌入图像的名称。
where nameImgEmbedded contains the name of embedded image.
祝你有愉快的一天。
:)
这篇关于ReportViewer tablix如何动态显示或隐藏图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!