我的数据库:
我的linq查询:
DataClasses1DataContext dataContext = new DataClasses1DataContext();
var query = (from name_table in dataContext.name_tables select name_table.name).ToList();
CrystalReportSource1.ReportDocument.SetDataSource(query);
我的水晶报告设置:
.aspx页面:
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
ReportSourceID="CrystalReportSource1" />
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
<Report FileName="DailyAttendenceRepoort.rpt">
</Report>
</CR:CrystalReportSource>
.aspx.cs点击事件:
DataClasses1DataContext dataContext = new DataClasses1DataContext();
var query = (from name_table in dataContext.name_tables select name_table.name).ToList();
CrystalReportSource1.ReportDocument.SetDataSource(query);
结果:什么都没有显示。
问题:为什么报告没有显示任何内容?