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
Reporting services 在ssrs中,如何在表格的交替列中获得不同的背景色?_Reporting Services - Fatal编程技术网

Reporting services 在ssrs中,如何在表格的交替列中获得不同的背景色?

Reporting services 在ssrs中,如何在表格的交替列中获得不同的背景色?,reporting-services,Reporting Services,在ssrs中,如何在表格的交替列中获得不同的背景色? 我们知道如何在备用行中获得差异BG颜色,但不确定是否有备用列在tablix中最后添加新列并将textbox的名称设置为“Rownumber”&将textbox的值设置为表达式 =RunningValue(Fields!PrimaryColumnName.Value, CountDistinct, "DataSet1") 根据报告中的内容更改PrimaryColumnName和dataset1 现在选择tablix行并将背景颜色的表达式设置为

在ssrs中,如何在表格的交替列中获得不同的背景色?
我们知道如何在备用行中获得差异BG颜色,但不确定是否有备用列

在tablix中最后添加新列并将textbox的名称设置为“Rownumber”&将textbox的值设置为表达式

=RunningValue(Fields!PrimaryColumnName.Value, CountDistinct, "DataSet1")
根据报告中的内容更改PrimaryColumnName和dataset1

现在选择tablix行并将背景颜色的表达式设置为

=iif(ReportItems!Rownumber.Value Mod 2=1,"#dddddd","White")
根据需要更改颜色代码和名称。。最后从tablix中隐藏新添加的列“Rownumber”

了解

以上工作为交替行颜色

对于备用列颜色,我们必须添加一些自定义代码&然后在每个列上使用这些代码

dim Counter as integer=1
Public function getCounter() as Integer
Counter=Counter+1
return Counter
end function
现在在每列上使用/设置背景表达式,如

=iif(code.getCounter Mod 2=1,"#dddddd","White")