简体   繁体   English

通过linq在Visual Studio 2010中使用Crystal Report

[英]Crystal Report in Visual studio 2010 via linq

i am working on an application in which i need to use reporting. 我正在开发需要使用报告的应用程序。 i have used LINQ to entities and MS SQL server as database in my whole application. 我已经在整个应用程序中使用LINQ将实体和MS SQL Server用作数据库。 Now when i started working reports i noticed that crystal reports or no more included in visual studio. 现在,当我开始工作报告时,我注意到Visual Studio中不再包含Crystal报告。 i downloaded it separately and installed it. 我单独下载并安装了它。 i have also designed my report successfully but the problem is that how would i use LINQ with it?? 我也成功地设计了报告,但问题是我将如何使用LINQ? I translated my linq query into datatables and it worked but the problem i am stuck at is, my report is based on two tables, after translation i am able to see records of first table but not the second one. 我将linq查询转换为数据表,并且可以正常工作,但我遇到的问题是,我的报告基于两个表,转换后我可以看到第一个表的记录,但看不到第二个表的记录。

Can any one please help me with it? 有人可以帮我吗?

use this 用这个

    Dim db As New NorthwindEntities
    Dim query = db.Employees.Select(Function(p) p)
    Dim oRpt As New CrystalReport1
    oRpt.SetDataSource(query)
    CrystalReportViewer1.ReportSource = oRpt

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM