I have a rdlc report I want to bind a list of my own custom class to as a data source.
I've used some code recommended on this site to build the DataTable
This works really well
//convert my list of Invoices to a DataTable
var dt = invoices.CopyToDataTable(dataTable, LoadOption.PreserveChanges);
//Setup a new DataSource
var rds = new ReportDataSource {Name = "ReportDataSet", Value = dt};
//Add that datasource to my ReportViewer
rvSampleInvoice.LocalReport.DataSources.Add(rds);
//Map my report path, etc
rvSampleInvoice.LocalReport.ReportPath = Server.MapPath("etc");
This all works fine, when I load my page, the report shows, but it only has one 2 pages. the first is the first entry in my invoices collection, and when I click next page, it's a blank page. I've added a gridview to the page, and bound the DataTable (dt) to it and it displays as a nice table with a row of headers and 20 rows of data.
I'm wondering if I've got something wrong on how to bind a RDLC to my List of Invoices