在n层中使用Crystal报告和linq到sql [英] Crystal report and linq to sql in n-tiers
本文介绍了在n层中使用Crystal报告和linq到sql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在N-Tier应用程序上工作,包括Dal项目和UI项目,我在UI项目中有一个水晶报表,我想绑定在Dal项目中的一个类到UI项目中的水晶报告,我不知道怎么回事
谢谢
解决方案
只要DAL在UI中有引用(我假设它),我认为代码应该是这样的
DAL dal = new DAL();
crystalReportViewer1.ReportSource = dal.tbl1;
crystalReportViewer1.RefreshReport();
您必须确保正确填写tbl1并且报告预计数据会进入。
Hi,
I work on N-Tier application that consists of Dal project and UI project , i have a crystal report in UI project, i want to bind a class in Dal project to the crystal report in the UI project, i do not know how
thanks
解决方案
As long as the DAL has a reference in the UI (I am assuming it does) I would think the code should be something like this
DAL dal = new DAL(); crystalReportViewer1.ReportSource = dal.tbl1; crystalReportViewer1.RefreshReport();
You'll have to make sure the tbl1 is filled correctly and the report expects the data coming in.
这篇关于在n层中使用Crystal报告和linq到sql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文