简体   繁体   English

SSRS lookupset-行输出

[英]SSRS lookupset - row output

I am looking to use the lookupset function. 我正在寻找使用lookupset函数。 I have a one to many relationship when one Risk has many Actions. 当一种风险有很多行动时,我与一对多关系。

Using this function I can return it as a comma separated line, however what I really need is for each entry to display in a new row of a table, is this possible? 使用此函数,我可以将其以逗号分隔的行形式返回,但是我真正需要的是让每个条目显示在表的新行中,这可能吗?

I have replaced the comma so instead of creating a comma separated line it does a newline, however I need it to line up with other values. 我已经替换了逗号,所以与其创建逗号分隔的行,还不如换行,但是我需要它与其他值对齐。 This Is why I would like to to come out in rows in a table. 这就是为什么我想排成表格的原因。

Can it display on separate lines rather than separate rows? 它可以显示在单独的行而不是单独的行吗? If so, then you can simply separate the fields using carriage return/line feed pairs, like so: 如果是这样,那么您可以简单地使用回车/换行对来分隔字段,如下所示:

=Join(LookupSet(Fields!Id.Value, Fields!Id.Value, Fields!FieldToLookup.Value, "LookupDataset"), vbCrLf)

Otherwise you are better off defining a subreport and embedding that in your table. 否则,最好定义一个子报表并将其嵌入表中。 The subreport is simply a report that is just a table with the report taking a parameter. 子报表只是一个报表,它只是一个表,其中的报表带有一个参数。 You add this to the table in the main report using the toolbar and then set the parameters in the subreport properties to pass in the identification field name from the table's dataset. 使用工具栏将其添加到主报表中的表中,然后在子报表属性中设置参数以传递表数据集中的标识字段名称。

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

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