ReportViewer Layout and custom datasource problem
Posted on 2010-09-21
Ok I'll admit this is the first time I've tinkered with ReportViewer, I'm using VS2010. My data is in the form of a List of Order objects, each contains info such as buyer's name, address, date, etc. and a List of OrderDetail objects. Pretty straightforward.
First problem is I want to display a single Order with a subreport containing the OrderDetails. If I drag fields from the Order onto the Report Designer the first and only first object in my list displays. The back, next controls are disable.
However if I put all the field into a List on the Report Designer surface, each object in my List<Order> gets displayed all at once on the ReportViewer form. How do I instruct the Viewer to display a single entity at a time?
2nd problem. VS2010 ReportViewer has a problem in that it cannot drill down into nested objects, so I have flattened my objects. Each time the viewer displays an object from my list, I want to be able to build a list to set to the bindingsource for the subreport. But it seems RV wants a complete list of OrderDetails and set a filter. I've read that it can be done manually, how?