PC Review


Reply
Thread Tools Rate Thread

How to create DataSet from a LINQ query for Crystal Reporting

 
 
Russ Sherlock
Guest
Posts: n/a
 
      29th Apr 2009
Problem = StoredProcedure(n,n) -> An Entity -> Linq Query -> (Dataset ->
CrystalReport || DataGridView)

I can create an EntitySet from a parameterised StoreProcedure.
.... I query the the results using Linq (filter , sort etc)
.... I convert the results to a List<EntitySet> (DataGridView displays the
result)

*How* do I produce a DataSet from the query so that Crystal Reports can then
print it?
(The Cystal Report was designed using the Entity object.)

ItemsOnPremisesReport crystalRep = new ItemsOnPremisesReport();
using (DbaseEntities de = new DbaseEntities())
{
List<EntitySet> results = from item in
de.stockHeldForCust(3).AsEnumerable<EntitySet>()
select item;

// create DataSet from result...
// assign DataSet to CrystalReport
crystalRep.SetDataSource... =
crystalReportViewer1.ReportSource = crystalRep;
}

Russ



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
populate a DataSet via a LINQ query (Linq to XML) Anthony Microsoft C# .NET 12 19th Apr 2010 06:49 AM
Is it possible to create a LInQ query thar solve my problem Tony Johansson Microsoft C# .NET 1 8th Feb 2009 11:51 PM
Fill Dataset from linq to Dataset query =?Utf-8?B?SnVhbiBQdWVibGE=?= Microsoft C# .NET 0 28th Aug 2007 12:50 PM
How to create a dataset from XML for use in Crystal Reports Kirk Microsoft ADO .NET 5 13th Jan 2006 07:00 PM
A Query Related to Crystal Reports with DataSet Maqsood Ahmed via .NET 247 Microsoft C# .NET 0 17th Jun 2004 09:20 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:42 AM.