我正准备使用LINQ填充水晶报表。这是我的代码:var results = (from supp in dbdata.Suppliers select supp).ToList();cr1.Load(@"CrystalReport1.rpt");cr1.SetDataSource(results);crystalReportViewer1.ReportSource = cr1;当我运行该应用程序时,它会生成一个错误: DataSet不支持System.Nullable 。我该如何解决? (adsbygoogle = window.adsbygoogle || []).push({}); 最佳答案 尝试这个 : CrystalReport1 cr = new CrystalReport1(); var results = (from supp in dbdata.tSamples where supp.ID == IDNUMBER select new { supp.Name, supp.Model, supp.Producer }).ToList(); cr.SetDataSource(results); crystalReportsViewer1.ReportSource = cr; (adsbygoogle = window.adsbygoogle || []).push({}); 10-05 22:21