3
How is it possible to generate a report of an object and its dependencies in Report Viewer with C#? I have a Car class, where each Car has its Models. I can display a report with the Cars and Models separately, but how do I get them to be
Modelo1
Carro1
Carro2
Modelo2
Carro1
Carro2
Modelo3
Carro1
How do I link to link the cars belonging to the model? knowing that in the Car class I have an attribute that contains the model code.
Related: http://www.andrealveslima.com.br/blog/index.php/2017/03/15/como-utilizar-o-report-viewer-no-visual-studio-2017/ and http://www.andrealveslima.com.br/blog/index.php/2010/10/09/groups-simples-report-viewer-do-vs-2010/ one teaches to install and the other teaches to make the group.
– novic
Hello Virgilio, I had already seen these video lessons and unfortunately they do not answer what I want to do. i have two separate classes and not a single class with all the data, so it is loaded my report through 2 model and car datatables, and I wanted in the report itself to link them, also not using a table but rather a list, would it be the same procedure? thanks for the help
– Bruno Aparecido da Silva
You can make a Viewmodel join the information with Linq and.show the data I reproduced and worked. Ie meets yes what you need... Where these classes come from, Voce uses ORM ???
– novic
This was a basic example for me to have an idea of how to do ... my doubt would be a little more complicated ... see that in the question I specify that I wanted a link to link the cars belonging to the model ... to be easy to understand at all, however in my application I work with accounts / installments ... where an account has 0 or many installments ... my need would be to create a report that displays all accounts in sight and in case if they focus on time display installments ... I think I did not make clear enough in my question "/
– Bruno Aparecido da Silva
But maybe I can do this with your solution, I use a normal DAO, where I make a select. I think I could make a select of all this and play in a view, and where the account is the view I color an if in the application so that it was not necessary to display the installments. but how do I do that? how do I link two tables and do an if to appear or not a certain table?
– Bruno Aparecido da Silva
I did an example this on pc now I’m on mobile after I post
– novic
Right! I’m on hold, thanks for your help
– Bruno Aparecido da Silva