views:

532

answers:

2

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?

A: 

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.

aprescott
Could you explain a little more how you passed the parameter? I'd love to hear that for my solution. Thanks!
Matthew Lock
Passing parameters to sub-reports is a two step process. First, define your parameter in the sub-report RDLC. (Right-click > Parameters) Then, in your main report, specify which value you'd like to pass as a parameter in the properties of the sub-report.The third part of my solution was to then filter my table in the sub-report using the parameter value.Hope this helps!
aprescott
I figured out the same - "datatables" have no hierarchy in the client side reports, you really need a subreport to support this. Lists are similar, but really just allow filtering based on grouped results. RDLC is kinda crazy to figure out.
boomhauer
A: 

nobody figured this out? i could really use this as well.

boomhauer