views:

3303

answers:

5

Has anyone figured out how to use Crystal Reports with Linq to SQL?

A: 

I don't believe you can without converting your Linq2SQL data into a DataSet.

Giorgio Galante
+1  A: 

Altough I haven't tried it myself it seems to be possible by using a combination of DataContext.LoadOptions to make it eager to accept relations and GetCommand(IQueryable) to return a SQLCommand object that preserves relations.

See more info on MSDN Forums.

Pascal Paradis
A: 

The msdn doc's suggest that you can bind a Crystal Report to an ICollection.

Might I recommend a List(T) ?

David B
A: 

Try this link: MSDN

+1  A: 

try This i think this is your answer: How to use LINQ to SQL for binding data in CrystalReports 2008

mahdiahmadirad