Multiple tables 1xN

0

I'm starting with ReportViewer (Winforms).

As usual, I work with several tables that have fields with 1xN relation. Example: In the Order Master table there is a field called Cod_Cliente that stores the primary key of another table, the Customer Master.

In the report I need to show the Client Name instead of the Code.

I know that I can recover through SQL (JOIN), but this is not practical, since I have many fields with this type of relation (+ -20). SQL will get very complex.

I thought about:

  • Make a giant SQL and twist to run, or ...
  • Preprocess to populate an object already ready for display and use it as DataSource.
  • My question is, what is the best practice in this case?

        
    asked by anonymous 13.09.2018 / 19:04

    0 answers