4 Answers, 1 is accepted
0
Massimiliano Bassili
Top achievements
Rank 1
answered on 06 Jan 2011, 04:19 PM
0
Richard M
Top achievements
Rank 1
answered on 06 Jan 2011, 05:04 PM
I will definitely check out this videos. I can use your help with one specific problem I am having. I am trying to bind my Report1 from a linq query using the Open Access model. Here is my code:
public Report1 ()
{
InitializeComponent();
this.DataSource = GetProducts();
}
public Report1 ()
{
InitializeComponent();
this.DataSource = GetProducts();
}
public System.Collections.Generic.List<Product> GetProducts ()
{
AdventureWorksEntityDiagrams conn = new AdventureWorksEntityDiagrams();
List<Product> results = (from c in conn.Products
select c).ToList();
return results;
}
I'm sure it has to do with my GetProducts() method, but I haven't been able to figure it out.
0
Accepted
Massimiliano Bassili
Top achievements
Rank 1
answered on 07 Jan 2011, 05:36 PM
I don't see anything wrong with your code. What is the problem? If you expect that the report would pick up the data and autogenerate tabular layout for you - this is not how it works. You have to create a layout yourself and use proper expressions for the TextBoxes e.g. = Fields.MyColumn.
Cheers!
Cheers!
0
Richard M
Top achievements
Rank 1
answered on 07 Jan 2011, 08:10 PM
I apologize, you were correct and the code works fine. Thanks for all your help.