Ciao,


Sto cercando di generare un rapporto con reportView ma ho sempre il solito errore e non riesco a risolvere:

-A data source instance has not been supplied for the data source 'DataSet1'.

Il codice è questo:


codice:
ReportViewer1.AsyncRendering = true;
            ReportViewer1.ShowRefreshButton = false;
            MemoryStream ms = new MemoryStream(Properties.Resources.Report1);
            ReportViewer1.LocalReport.LoadReportDefinition(ms);

            ReportDataSource rds = new ReportDataSource();
            rds.Name = "DataSet1_Report";
            fede dSDocsContentReport = new fede();
            dSDocsContentReport.DataSetName = "DataSet1";
            var table = dSDocsContentReport.Tables[0];

            var dr = table.NewRow();
            dr[0] = "prova";
            dr[1] = "prova";
            dr[2] = "prova";
            table.Rows.Add(dr);

                    rds.Value = dSDocsContentReport.Tables[0];
                    ReportViewer1.LocalReport.DataSources.Add(rds);
                    ReportViewer1.LocalReport.Refresh();