开发者

SSRS Tablix Column Group based formating with cells that contain no values

I have a report with a tablix. In the Tablix I have 2 Column Groups, the first level in the Column Groups is "Continent" and the second l开发者_如何转开发evel is "Country". Now the users want to have different background colors depending on the value in the "Continent" group so that all Asian Countries are green and all European Countries are blue. This works fine as long as a cell has a value. However sometimes there is no record for that in the database therefore a cell on the tablix stays empty. Is there a way to find out to which Column Group such an empty cell belongs to use this information in the formating expression ?


moontear is on to something, it may be easier to change the query to always return a result for every combination.

You can get what you're after directly in RS tho. If you add another cell to your tablix to force RS to calculate a result for the intersection of the two columns then you can use Fields!Continent.Value. i.e. if you add a cell that is =count(Fields!Continent.value) then it'll return 0 and you can then have an expression like =iif(Fields!Continent.Value=1,"Red","White")

You'll then want to shrink the column down to 0 width and hide it so it doesn't get seen in the final output.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜