views:

149

answers:

0

Hi All,

I'm creating an SSRS client side report (RDLC) and am using custom objects to populate the report. The report is an invoice report which has line items. The report datasource is a List<Invoice>. Each Invoice object has a List<LineItem> property that should map to the invoice line items on the report.

This seems like it should be really easy, but I keep getting stuck. What is the best way to design the report?

  1. Invoice report with line items subreport. If I do this, how do I set the datasource on the subreport to only show the line items for its invoice?
  2. Invoice report with a tablix table for line items that somehow links to the invoice line items. Once again, how do I link the line items to the invoice. The only way I can get the line item class to show up in the report data source is by adding another datasource (in which case it's not available in the report).
  3. Other ideas?

If there is no other way (or a better practice), I'm also open to using a Dataset instead of custom entities. However, I don't want to create the dataset from the database tables. The data for this report comes from a legacy accounting database that has a ton of irrelevant crap in the tables (hence the custom entities).

UPDATE: As a workaround, using option 1, I'm passing an invoice parameter to the line items subreport. In the subReportProcessing event handler, I'm executing a LINQ query to find the associated line items that belong in the subreport. This is obviously a horrid implementation.

Thanks for your input!