sql - SSRS 从报告中删除列

标签 sql sql-server sql-server-2008 reporting-services ssrs-2008

我在这里将 13 列作为虚拟列包括在内:

+----+---+---+---+----+---+---+---+---+---+----+----+----+----+
|    | 1 | 2 | 3 | 4  | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
+----+---+---+---+----+---+---+---+---+---+----+----+----+----+
|  1 | 0 | 0 | 0 |  0 | 0 | 0 | 0 | 0 | 0 |  0 |  0 |  0 |  1 |
|  2 | 0 | 0 | 1 |  0 | 0 | 0 | 0 | 0 | 0 |  0 |  0 |  0 |  1 |
|  3 | 0 | 0 | 0 |  0 | 0 | 1 | 0 | 0 | 0 |  0 |  0 |  0 |  1 |
|  4 | 1 | 0 | 0 | 20 | 0 | 0 | 0 | 0 | 0 |  0 |  0 |  0 |  1 |
|  5 | 0 | 0 | 0 |  0 | 0 | 0 | 0 | 0 | 0 |  0 |  0 |  0 |  1 |
|  6 | 0 | 0 | 0 |  0 | 0 | 0 | 0 | 0 | 0 |  0 |  0 |  0 |  1 |
|  7 | 0 | 0 | 0 |  0 | 0 | 0 | 0 | 0 | 0 |  0 |  0 |  0 |  1 |
|  8 | 0 | 0 | 0 |  0 | 0 | 0 | 0 | 0 | 0 |  0 |  0 |  0 |  1 |
|  9 | 0 | 0 | 0 |  0 | 0 | 0 | 0 | 0 | 0 |  0 |  0 |  0 |  1 |
| 10 | 0 | 0 | 0 |  0 | 0 | 0 | 0 | 0 | 0 |  0 |  0 |  0 |  1 |
+----+---+---+---+----+---+---+---+---+---+----+----+----+----+

我包含一个虚拟列的原因是如果列 112 都是零,我仍然想为该行包含一个条目。

如您所见,第 1 行不会包含在内。

此报告由 SSRS 生成。

我想知道是否有办法隐藏 13 列?

我可以做某种条件格式吗?

澄清这里是我的查询:

select tat.*, tat.tat as tat2 from tat

它在报告中是这样组织的:

enter image description here

此数据集 [TAT] 包含专用于 13 列的虚拟数据

最佳答案

可以通过以下步骤根据值隐藏列组中的特定列。

右键单击要隐藏的列组的标题,Column Group -> Group Properties

SSRS Column Group Properties

单击Visibility Pane 并选择Show or hide based on an expression 单选按钮。使用表达式确定何时隐藏列。

True 隐藏该列,False 显示它。您需要更新我示例中的字段名称以匹配您的月份字段名称。

SSRS Column Group Visibility

关于sql - SSRS 从报告中删除列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10917941/

相关文章:

tsql - 插入 dest 并更新源

sql-server-2005 - SQL Server 错误处理 : exceptions and the database-client contract

mysql - 根据条件从表中选择计数

sql - 如何在SQL Server 2008中获取时间字段的总和

sql - SQL Compact中的种子身份标识列

mysql - 存储过程中的多案例选择

python - 从 mssql 连接获取受影响的行数

c# - 如何在 SQL Server 2008 中存储多行文本以跟踪 asp.net 中的新行

sql - gorp: "auto_increment"附近:语法错误

SQL代码风格。我应该使用 INNER 关键字吗