Search code examples
visual-studio-2010master-detailreport-viewer2010

Master-Detail reports using ReportViewer and VS2010 - with two tables not one


I've looked through GotReportViewer.com in some detail, but I just can't find enough of a clue to really work out how to do this.

I need to effectively join two datatables (client-side) on a primary key, and show some information from one table in one area, and other (listed) information from the other in another.

From what I read, it's possible (though I haven't managed it yet) to join the tables together to form a third, and use filters to achieve this, although it seems like a lot of work when you're building the datasources dynamically as I am.

Is it possible to generate two datasources that share a key (one implementing the 'many' part of the 1:many relationship), and create a master-detail report that uses both?

If there are any simple tutorials (C# or VB would be fine if I need code) for this I'd appreciate a pointer. There are several unanswered questions here on similar topics to this, which is a worry!

TIA


Solution

  • I gave up on Microsoft's reporting tools, switched to Crystal, and life became a lot easier. Importing an XSD generates a data source, in which tables can be easily linked.

    Job done.