问题
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.
Here is a simplified example: table1 = "Purchase" has columns PurhcaseID, PurchaseNumber, PurchaseDate table2 = "PurchasedItem" has columns PurchaseItemID, PurhcaseID, ItemDescription
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?
回答1:
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.
来源:https://stackoverflow.com/questions/1180118/rdlc-filtering-nested-tables