Upon trying to generate a report in one of the Windows Forms projects in my .NET 4.7.2 solution, it throws an error stating that the report definition is invalid:
I've tried installing the following packages: Nuget Packages list
In the properties section of my 'Report1.rdlc' file, I have:
Build action: Content Copy to output directory: Copy if newer (I've tried with 'copy always' and it still doesn't work)
Report1.rdlc is in the root directory of the project. Here is the code of the button that should generate the report:
private void btn_reporte_Click(object sender, EventArgs e)
{
SqlCommand command = new SqlCommand("select * from productos", connection);
SqlDataAdapter adapter = new SqlDataAdapter(command);
DataTable table = new DataTable();
adapter.Fill(table);
reportViewer1.LocalReport.DataSources.Clear();
ReportDataSource source = new ReportDataSource("inventario_dbDataSet1", table);
reportViewer1.LocalReport.ReportPath = "Report1.rdlc";
reportViewer1.LocalReport.DataSources.Add(source);
reportViewer1.RefreshReport();
}