2
I am using Report Viewer to do some reports, but I am 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 in 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 the Product Code and Product Name but cannot access the items of my Category object ... I use the expression =Fields!Codigo.Value
to Retrieve Product Code and in Expression Fields an option appears with Category First(Fields!Categoria.Value, "Data")
but even if I put it it does not carry anything, I wonder how it is possible to carry the name of the Category, for example First(Fields!(Categoria.NomeCategoria).Value, "Data")