简体   繁体   English

如何在SSRS报表中绝对定位数据集中的每一行?

[英]How can you absolutely position each row in a dataset in a SSRS report?

I have a SSRS local report and I need to display a list of addresses. 我有一个SSRS本地报告,我需要显示地址列表。 Naturally, they need to be formatted to look how addresses should. 自然,需要对它们进行格式化以查看地址的格式。 There will never be more than 10 and could be as low as zero. 永远不会超过10,并且可能低至零。 I am thinking like 3 rows of 4 or 4 rows of 3 to maximize the real estate. 我在想像3行4或4行3来最大化房地产。

I have a few ideas but they all seem, well, there should be a better way: 我有一些想法,但似乎都应该有更好的方法:

  1. Format the entire text in sql and return it in a large text box in the report. 在sql中格式化整个文本,然后在报表的大文本框中返回它。
  2. Create an object with 3 properties that are strings. 创建具有3个字符串属性的对象。 Every three would fill each property and the next would be a new row. 每三个将填充每个属性,下一个将是新行。 This would create four rows of three strings. 这将创建三个字符串的四行。 I could create a table with each property being the column. 我可以创建一个表,每个属性都是列。
  3. Somehow use a pivot table (or few to turn the rows into columns. This would be similar to #2. 以某种方式使用数据透视表(或将数据透视表转换为列的方法很少。这类似于#2。
  4. See if a matrix could do this. 看看矩阵是否可以做到这一点。 (I don't think it can) (我认为这不可能)

Does anyone have any better ideas or perhaps a best way of doing one of these? 有没有人有更好的主意或做这些主意的最佳方法?

I found a similar post to what I wanted here: SSRS - How to build a simple multi-column report? 我在此处找到了类似的帖子: SSRS-如何构建简单的多列报告? .

I added four vertical lists to the page all pointing to the same dataset. 我在页面上添加了四个垂直列表,它们都指向同一数据集。 I put a textbox in each single cell of the listbox with the fields for the address formatted how I wanted. 我在列表框的每个单元格中放置了一个文本框,其中的地址字段格式设置为所需的格式。 I then set the visibility for the tablix/rectangle to =IIf(RowNumber("DataSet1") Mod 4 = 1, False, True) with each list having Mod 0 through 3 respectively. 然后,我将Tablix /矩形的可见性设置为=IIf(RowNumber("DataSet1") Mod 4 = 1, False, True) ,每个列表分别具有Mod 0到3。

I'm not marking this as a duplicate since the other answer suggested using the filter expression or changing the report layout properties which did not work for me. 我没有将其标记为重复项,因为其他答案建议使用过滤器表达式或更改对我不起作用的报表布局属性。

I hope this helps someone else. 我希望这可以帮助其他人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM