Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/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
Reporting services Reporting Services条件行颜色_Reporting Services - Fatal编程技术网

Reporting services Reporting Services条件行颜色

Reporting services Reporting Services条件行颜色,reporting-services,Reporting Services,我有一个报告,在如下列表中显示了客户机名称jsut: ATK FLD FLD DB DB DB BL 我已经把他们分组了,但我想知道是否有办法,这样我可以让每个客户的颜色分开,例如白色,然后灰色,然后白色,然后灰色等 现在我使用的背景色如下: =IIF(RowNumber(Nothing) Mod 2,"Gainsboro","White") 这只会使每一行变成白色或灰色。是否有办法使其他客户机变为白色或灰色?在报告的自定义代码中添加以下内容:- Public shared currentR

我有一个报告,在如下列表中显示了客户机名称jsut:

ATK
FLD
FLD
DB
DB
DB
BL
我已经把他们分组了,但我想知道是否有办法,这样我可以让每个客户的颜色分开,例如白色,然后灰色,然后白色,然后灰色等

现在我使用的背景色如下:

=IIF(RowNumber(Nothing) Mod 2,"Gainsboro","White")

这只会使每一行变成白色或灰色。是否有办法使其他客户机变为白色或灰色?

在报告的自定义代码中添加以下内容:-

Public shared currentRowColour as string = "Red"

    public function GetBackGroundColour(previousValue as string, currentValue as string) as string

        if previousValue <> currentValue then
            if currentRowColour = "Red" then
                currentRowColour  ="Orange"
            else
                currentRowColour ="Red"
            end if
        end if
        return currentRowColour 

    end function
公共共享CurrentRowColor为string=“红色” 公共函数GetBackgroundColor(previousValue作为字符串,currentValue作为字符串)作为字符串 如果以前的值为currentValue,则 如果CurrentRowColor=“红色”,则 CurrentRowColor=“橙色” 其他的 CurrentRowColor=“红色” 如果结束 如果结束 返回当前行颜色 端函数 然后编辑文本框(或行)背景色的表达式 =Code.getBackgroundColor(上一个(字段!.Value),字段!.Value)