清除 SQL Reporting Services 中的重复列值 [英] Blank out duplicate column values in SQL Reporting Services

查看:38
本文介绍了清除 SQL Reporting Services 中的重复列值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这一定很愚蠢很容易做到,但我没有看到.

This has to be stupid easy to do, but I'm not seeing it.

我有一份 SQL Reporting Services (SQL 1008 R2) 报告.

I have a SQL Reporting Services (SQL 1008 R2) report.

我使用 tablix 来基本显示:

I'm using a tablix to basically show:

COL 1 |  COL 2 |  COL 3 |  COL 4
----------------------------------
100   |  100   |  100   |  Item 1
100   |  100   |  101   |  Item 2
100   |  100   |  102   |  Item 3
100   |  110   |  110   |  Item 4
100   |  110   |  110   |  Item 4
100   |  110   |  111   |  Item 5
100   |  110   |  112   |  Item 6

但我想抑制前两列中的重复值,使其看起来像这样:

But I want to suppress repeating values in those first two columns so it looks like this:

COL 1 |  COL 2 |  COL 3 |  COL 4
----------------------------------
100   |  100   |  100   |  Item 1
      |        |  101   |  Item 2
      |        |  102   |  Item 3
      |  110   |  110   |  Item 4
      |        |  110   |  Item 4
      |        |  111   |  Item 5
      |        |  112   |  Item 6

我认为这可能就像右键单击该列并选择隐藏重复值"一样简单,但我没有看到.我现在要道歉,因为当有人指出它是多么容易做或找到时,我会觉得自己很愚蠢.

I thought it might be as easy as right clicking the column and selecting "Hide duplicate values", but I'm not seeing that. I'll apologize now because I'm going to feel stupid when someone points out how easy it is to do or find.

推荐答案

最好只使用组,但如果您想保持这种方式,请尝试:

It is probably best to simply use groups, but if you want to keep it this way, try:

=IIf(Previous(Fields!Col1.Value) = Fields!Col1.Value, Nothing, Fields!Col1.Value)

或者您可以将文本框的 HideDuplicates 属性设置为包含组名称(在您的情况下,大概是 Tablix1_Details)

Or you can set the textbox's HideDuplicates property to the containing group name (in your case, presumably Tablix1_Details)

这篇关于清除 SQL Reporting Services 中的重复列值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆