i have a rdlc report that is bound to following class:
public class Product
{
DataContext context;
public Product()
{
context = new DataContext();
}
public List<Product> GetBoughtItemsForUser(string userName)
{
//linq query to collect data
return query.ToList();
}
public string Name {get;set;}
public int Quantity {get;set;}
}
in my rdlc i’ve set the report dataset to GetBoughtItemsForUser. now i want to pass the userName value which is actually the Page.User.Identity.Name so how should i do this?
1 Answer