How would I create a function using my EntityDiagrams file and a LINQ statement, to bind to a textbox I wasnt to add to my Report?
I tried creating this function in Report1.cs:
public static string myFunction( )
{
MyEntityDiagrams1 conn = new MyEntityDiagrams1();
var getResults = from a in conn.Products
select a.Name;
return getResults.ToString( );
}
Then in the TextBox I add to my report, I right click, go to Expressions and choose myFunction( ), but I get an error when I try to view in Preview.
I tried creating this function in Report1.cs:
public static string myFunction( )
{
MyEntityDiagrams1 conn = new MyEntityDiagrams1();
var getResults = from a in conn.Products
select a.Name;
return getResults.ToString( );
}
Then in the TextBox I add to my report, I right click, go to Expressions and choose myFunction( ), but I get an error when I try to view in Preview.