Hi,
For an app i'm developing, the user can print several invoices selected in a list.
The invoice report works just fine for one item. I decided to reuse this code and include them in a ReportBook object. What I can't figure is how to send the ReportBook object to the view with a ReportViewerViewModel object.
public ActionResult Invoices(IEnumerable<int> ids)
{
var book = new ReportBook();
ids.ForEach(id =>
{
var invoiceReport = new ReportDefinitions.Invoice();
book.Reports.Add(invoiceReport);
});
var source = new InstanceReportSource {ReportDocument = book};
var viewer = new ReportViewerViewModel();
return ?
}
If my way of doing is right, how can I pass the book to the Index view which use a ReportViewerViewModel model or resolve the report ?