How to create DataSet from a LINQ query for Crystal Reporting


Russ Sherlock

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

*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
select item;

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


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question