生成水晶报告 [英] generate crystal reports

查看:88
本文介绍了生成水晶报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我已经编写了以下代码,但它给出了错误:

找不到类型或名称空间IAPEntities.


Hi All,

I have written the following code but it gives the error:

the type or namespace IAPEntities could not be found.


protected void btngenerate_Click(object sender, EventArgs e)
        {
            ReportDocument report = new ReportDocument();
            report.Load(Server.MapPath("CrystalReport1.rpt"));

            using (IAPEntities db = new IAPEntities())
            {
                report.SetDataSource(from u in db.attendance1 select new { u.type, u.present, u.absent, u.working, u.month});
            }

            CrystalReportViewer1.ReportSource = report;
        }



请帮助我.

在此先感谢.



Please help me in this.

Thanks in Advance.

推荐答案

没什么可做的,但是通常您还是忘了在顶部放置use或忘了引用程序集.检查IAPEntities属于哪个命名空间,并确保您引用了程序集(即使它是同一解决方案中的另一个项目),也使用了正确的using语句.

希望这对您有帮助
There is not much to go on, but generally you or forgot to put a using on top or forgot to reference an assembly. Check to what namespace the IAPEntities belongs and make sure you referenced the assembly (even if it is another project in the same solution) and you use the correct using statement.

hope this helps


通过在包含类型引用的代码文件顶部使用using语句,确保将名称空间导入项目中.
Make sure that you are importing the namespace into your project by having a using statement at the top of the code file that contains the type reference.


这篇关于生成水晶报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆