1

我已经完成了单表水晶报表。现在我想在水晶报表中显示多个表格数据,但它给了我异常“DataSet 不支持 System.Nullable<>。” 请指导我解决这个问题,或者给我其他解决方案。守则是

ReportDocument 报告 = new ReportDocument();

        report.Load(Server.MapPath("Assets.rpt"));
        using (var matr = new InventoryDBEntities())
        {
            report.SetDataSource(from p in matr.Issueds
                                select new
                                 {
                                     SerialNo = p.SerialNo,
                                     FixedAssetNO = matr.Items.Where(b => b.SerialNo == p.SerialNo).Select(b => b.FixedAssetNO).FirstOrDefault(),
                                     Category = matr.Items.Where(b => b.SerialNo == p.SerialNo).Select(b => b.Type).FirstOrDefault(),
                                     ModelNo = matr.Items.Where(b => b.SerialNo == p.SerialNo).Select(b => b.ModelNo).FirstOrDefault(),
                                     IssueToUser = p.IssuedPerson,
                                     IssueToDept = p.IssuedDept,
                                     UpdatedBy = matr.Emploees.Where(b => b.EID == p.EID).Select(b => b.Name).FirstOrDefault(),
                                     IssuedDate = p.IssuedDate,
                                  });

        }


            CrystalReportViewer1.ReportSource = report;
4

0 回答 0