score:2
Accepted answer
try this :
crystalreport1 cr = new crystalreport1();
var results = (from supp in dbdata.tsamples
where supp.id == idnumber
select new { supp.name, supp.model, supp.producer }).tolist();
cr.setdatasource(results);
crystalreportsviewer1.reportsource = cr;
Source: stackoverflow.com
Related Query
- C# how to populate a crystal report using LINQ
- How to reuse a linq expression for 'Where' when using multiple source tables
- How can I write the following code more elegantly using LINQ query syntax?
- How can I code an outer join using LINQ and EF6?
- How to populate a Class with Dictionary using LINQ
- How to flatten a multi level XML into a single level XML using c# code LINQ
- How to write this code using the Linq Extension Method-Syntax?
- How can I check the number of calls to the database in LINQ query when using .NET Core and Code First?
- How to populate a Class with Dictionary using LINQ 2
- How to populate List<T> inside .Select() using LINQ
- How to simplify the code Using LINQ
- How to populate a nested List Class using linq
- Using only Linq or Lambda, how do I combine both pieces of code to return List<Entity> e?
- How to handle nulls in this LINQ Code using a possible null List?
- How to update my model code using LINQ
- How to populate a complex object using Linq to Sql
- How to reinsert data from one table onto itself using LINQ in code migration?
- How to join one row to every row in source table using LINQ
- How to populate a view models using a linq query ASP.NET MVC 5 Entity Framework
- How to populate collection object using left join without duplicates in Linq
- How to populate a DropDownList from a SQL database using linq and only select Distinct Values
- How can I create a summary report using LINQ
- How do you populate a parent child data structure from XML where generic List<> objects are in parent and child structures using one LINQ query?
- Using LINQ and Entity Framework, how can I just populate some properties of a Dbo with data from the DB?
- how to fetch data from database using linq query for relationship 1:N and N:N (between 3 entity) in asp.net mvc EF code first?
- How do you populate complex data models when using Linq Query Syntax?
- How to call an Sql User defined Function using Entity frame work Code first approach with LInq c#
- How to populate a Class with Dictionary using LINQ 3
- How to load xml code block into existing xml file at a specific node using linq
- How do you perform a left outer join using linq extension methods
More Query from same tag
- Difference between the implementation of var in Javascript and C#
- C# datatable linq receiving mode 3 this ushort variable "Mins"
- C# Linq: Can you merge DataContexts?
- Another Simple LINQ to XML query
- C# Linq - Find Conflicting Times
- Linq grouping by sublist of entity which could be empty
- Linq ".any" equivalent in HQL
- Basic LINQ To Object query
- How to get selected checkboxes in Grid using lambda expression
- Remove sub IEnumerable from IEnumerable
- IQueryable/Linq Orderby Fail: Sorts only a limited number of records
- LINQ get the data from the datatable group by hours
- Linq query to orderby level then parent and child item
- Convert resultset in to Datatable
- How to await a ParallelQuery with LINQ?
- How to query a stored procedure object with Linq
- Linq query not returning expected results even when using DefaultIfEmpty
- Linq + Single line condition
- How can I reformat this to use the other kind of LINQ Query format?
- Where condition in linq or lambda query issue
- Merge two rows into single row based on a column using LINQ C#
- Performance of Orderby Linq
- Performance problems with Linq To CSV
- Linq and localhost, entity namespace is different than program namespace but still get error
- How Get All duplicate record using linq
- Linq where with ternary and brackets
- Use linq to remove elements in one list using a condition in another
- LINQ convert SQL server Datetime to string using a DTO
- Range variable hides a variable in an enclosing block LINQ
- How to convert bool to expression