Let's see if I explain the case correctly:
1.- Intento realizar un report que visualiza los datos de un objeto.
2.- Programo en Visual Studio 2017, c# y para escritorio (no asp .net).
3.- Utilizo un report local (rdlc) y el componente report viewer para visualizarlo.
If I use Visual Studio 2010, when I insert the report viewer in the form, the control is shown and it has a smart task manager button in which I can select the report to be displayed and work with its properties. If I run in Visual Studio 2010, the report appears correctly.
We turn to Visual Studio 2017 .... and to begin the report viewer is now shown as a component, without any visualization in the form. Apparently the association with the report is done by programming, since I do not see anywhere the task manager; if I execute it here, I do not get anything at all, only the form conternedor appears to me
The code that I have put in the Form_Load container of the report vieweres the one below, in which you specify that the report is local, which is, add the two lists of data objects (Invoice and Detail) and refresh The report viewer to show it. The result I get is only the blank form.
Any help?
Code
private void FrmReport_Load(object sender, EventArgs e)
{
reportViewer2.LocalReport.DataSources.Clear();
reportViewer2.ProcessingMode = ProcessingMode.Local;
LocalReport localReport = reportViewer2.LocalReport;
localReport.ReportPath = "ManagementReport.rdlc";
localReport.DataSources.Add(new ReportDataSource("GeneralDSManagementReport", Invoice));
localReport.DataSources.Add(new ReportDataSource("DetailDSManagementReport", Detail));
reportViewer2.RefreshReport();
}
Greetings and thanks