Topic: Designquestion about n:n Report

I am currently planning the design for a new application and need some "brain input" and help with a report.
.
Question comes About reporting and SQL.
.
I have at least two tables. One called   "customer" the other "articles".
.
Now I could do a report like articles purchased from a customer with

select customer.number, customer.name, articles.number, articles.text from customer, articles where articles.customer = customer.number    

.
Or a report like which customers has purchased a specific article with

select customer.number, customer.name, articles.number, articles.text from customer, articles where customer.number = articles.customer    

.
All SQL Selects as source for a report.
.
Now the question is how to setup a report for all customers and all articles, sorted and printed as "Customer -> Articles" or "Articles -> Customer" without restriction to one customer or article. Something like

select customer.number, customer.name, articles.number, articles.text from customer, articles group by customer.number

.
Would this work with MVD or does I need to change the SQL Statement or - worst case - it is not possible as SQL Statement and I must do a manual listing for all Articles/Customers with a script?

Any suggestions and information, please.
Thank you.

Re: Designquestion about n:n Report

Hello.


In your SQL queries I don't see a foreign key to make relationship between these two tables.


Please check out an example (you can do it without SQL):

Post's attachments

Attachment icon Report group.zip 8.13 kb, 1674 downloads since 2017-04-05 

Dmitry.