I'm using the Report Viewer to do some reporting, but I'm not able to access some data from my object. instead of making a direct connection to the database I pass a DataTable as a reference, and already in the ReportViewer I add a DataSet Object. This is the following structure used:
class Produto{
public int Codigo{get;set}
public string NomeProduto {get;set;}
public Categoria Cat {get;set;}
}
class Categoria{
public int Codigo{get;set}
public string NomeCategoria{get;set;}
}
In ReportViewer I have normal access to Code and ProductName but I can not access the items of my Category object ... I use the expression =Fields!Codigo.Value
to retrieve the Product code and in Expression Fields an option appears with Category First(Fields!Categoria.Value, "Data")
but even if I put this it does not load anything, I wanted to know how it is possible to load the name of the Category, for example First(Fields!(Categoria.NomeCategoria).Value, "Data")