如何将 Crystal Reports 绑定到实体框架实体?
我确实还没有找到解决方法。
(而且我还没有足够的积分来对现有问题进行投票)
至于我,我阅读了下面的链接
http://aspalliance.com/2049_Use_LINQ_to_Retrieve_Data_for_Your_Crystal_Reports.2 http://aspalliance.com/2049_Use_LINQ_to_Retrieve_Data_for_Your_Crystal_Reports.2
它告诉我如何链接 EntityFramework 和 Crystal Report。
至于后面的代码....
protected void Page_Load(object sender, EventArgs e)
{
Report.CrystalReport1 _Rpt = new Report.CrystalReport1();
List<Test> list_Test = new List<Test>();
using (tempdbEntities _tempdbEntities = new tempdbEntities()) {
list_Test = _tempdbEntities.Tests.ToList();
}
_Rpt.SetDataSource(list_Test);
CrystalReportViewer1.ReportSource = _Rpt;
CrystalReportViewer1.RefreshReport();
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)