RDLC 过滤嵌套表 [英] RDLC filtering nested tables

查看:29
本文介绍了RDLC 过滤嵌套表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个 RDLC 报告,其中数据集由多个数据表组成.有一个父表和几个子表.

I am creating an RDLC report where the dataset consists of several datatables. There is one parent table and several child tables.

我想做的是为父表中的每一行显示来自每个子表的相关数据.

What I would like to do is display relevant data from each child table for each row in the parent table.

这是一个简单的例子:table1 = "Purchase" 有列 PurhcaseID、PurchaseNumber、PurchaseDatetable2 = "PurchasedItem" 有列 PurchaseItemID、PurhcaseID、ItemDescription

Here is a simplified example: table1 = "Purchase" has columns PurhcaseID, PurchaseNumber, PurchaseDate table2 = "PurchasedItem" has columns PurchaseItemID, PurhcaseID, ItemDescription

在我的 RDLC 中,我有一个按 PurchaseDate 分组的 Purchase 表,并希望显示每次购买的 PurchasedItems.当前的解决方案使用子报表,但我不喜欢这样,因为当子报表显示没有数据时,它会留下一个难看的空白空间.(如果我可以在不留空白的情况下正确隐藏它,我就可以使用子报表.)

In my RDLC, I have a Purchase table grouped on PurchaseDate and would like to display the PurchasedItems for each Purchase. The current solution uses a subreport, but I do not like this because it leaves an ugly empty space when there is no data for the subreport display. (I would be fine with using a subreport if I could properly hide it without leaving an empty space.)

我也无法重写存储过程以返回单个表.

I am not able to rewrite the stored procedure to return a single table, either.

其他人如何处理这种情况?

How are others dealing with this scenario?

推荐答案

我最终放弃了使用父子数据源嵌套表的梦想.我只是使用子报表来显示子数据并传递一个用于过滤的参数.

I ended up giving up on my dream of nested tables with parent-child data sources. I am just using a subreport to display the child data and passing a parameter to be used for filtering.

这篇关于RDLC 过滤嵌套表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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