简体   繁体   中英

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. Now when i started working reports i noticed that crystal reports or no more included in visual studio. 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?? 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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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