如何在报表设计器中的一行上并排显示两行数据?

发布于 2024-08-08 05:31:04 字数 645 浏览 4 评论 0原文

我正在使用 SQL Server Reporting Services 2005,并且正在报表设计器/Business Intelligence Studio 中开发报表。现在我有一个看起来正常的表格,显示如下数据:

----------------
| A  | B  | C  |
----------------
| A1 | B1 | C1 |
----------------
| A2 | B2 | C2 |
----------------
| A3 | B3 | C3 |
----------------

我想要做的就是在同一行上并排显示两行,以便表格看起来像这:

-------------------------------
| A  | B  | C  | A  | B  | C  |    
-------------------------------
| A1 | B1 | C1 | A2 | B2 | C2 |
-------------------------------
| A3 | B3 | C3 | A4 | B4 | C4 |
-------------------------------

这可能吗?有谁知道如何做到这一点?到目前为止,谷歌搜索还没有为我找到任何结果。预先感谢您的任何帮助。

I am using SQL Server Reporting Services 2005, and I'm developing a report in Report Designer/Business Intelligence Studio. Right now I have a normal-looking table that displays data like this:

----------------
| A  | B  | C  |
----------------
| A1 | B1 | C1 |
----------------
| A2 | B2 | C2 |
----------------
| A3 | B3 | C3 |
----------------

What I would like to do, is display two rows side-by-side on the same line, so that the table would look like this:

-------------------------------
| A  | B  | C  | A  | B  | C  |    
-------------------------------
| A1 | B1 | C1 | A2 | B2 | C2 |
-------------------------------
| A3 | B3 | C3 | A4 | B4 | C4 |
-------------------------------

Is this even possible? Does anyone know how to accomplish this? Google searches have turned up nothing for me so far. Thanks in advance for any help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

水中月 2024-08-15 05:31:04

好吧,我知道如何做我想做的事了。我创建了一个包含 2 个(重复)表详细信息行的表,并具有以下值:

--------------------------------------------------------------------------------------------------------------------------------------------
| =Previous(Fields!A.Value) | =Previous(Fields!B.Value) | =Previous(Fields!C.Value) | = Fields!A.Value | =Fields!B.Value | =Fields!C.Value |
--------------------------------------------------------------------------------------------------------------------------------------------
| =Fields!A.Value           | =Fields!B.Value           | =Fields!C.Value           |                  |                 |                 | 
--------------------------------------------------------------------------------------------------------------------------------------------

然后,我转到每行的属性,并将“隐藏”值设置为表达式。对于第一行,我使用了这个表达式:

=Iif(RowNumber("table1") mod 2 = 0, false, true)

对于第二行,我使用了这个表达式:

=Iif(RowNumber("table1") = CountRows("table1") AND RowNumber("table1") mod 2 = 1, false, true)

这就成功了。现在它显示了我想要的方式。

Ok, I figured out how to do what I wanted. I created a table with 2 (repeating) table detail rows, with the following values:

--------------------------------------------------------------------------------------------------------------------------------------------
| =Previous(Fields!A.Value) | =Previous(Fields!B.Value) | =Previous(Fields!C.Value) | = Fields!A.Value | =Fields!B.Value | =Fields!C.Value |
--------------------------------------------------------------------------------------------------------------------------------------------
| =Fields!A.Value           | =Fields!B.Value           | =Fields!C.Value           |                  |                 |                 | 
--------------------------------------------------------------------------------------------------------------------------------------------

Then I went to the properties of each row, and set the "hidden" value to an expression. For the first line I used this expression:

=Iif(RowNumber("table1") mod 2 = 0, false, true)

For the second line, I used this expression:

=Iif(RowNumber("table1") = CountRows("table1") AND RowNumber("table1") mod 2 = 1, false, true)

That did the trick. It now displays how I wanted.

笑,眼淚并存 2024-08-15 05:31:04

您需要一份矩阵报告。

eidt:虽然现在我想起来可能只能让你得到这样的结果:

|        A1       |      B1         |          C1      |
-------------------------------------------------------
|  A  |  B  |  C  |  A  |  B  |  C  |   A  |  B  |  C  |

这种格式适合你吗?

You would need a matrix report.

eidt: although now that I think about it that would probably only be able to get you to something like this:

|        A1       |      B1         |          C1      |
-------------------------------------------------------
|  A  |  B  |  C  |  A  |  B  |  C  |   A  |  B  |  C  |

Would that format work for you?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文