Click to See Complete Forum and Search --> : Please help with this report...


Alexradu
October 2nd, 2005, 12:24 AM
I am not asking you to do it for me, I only need an idea to get me out of this mess, please...

I am trying to create a report based on three tables with the following structure (see below, jpg snapshots of some fictitious data).

All the three tables have the same structure, as you can see. Based on them I need to produce a report which would look like this:

For each Year/Month, I should have the following columns:

Dimension,
Category,

RET.Qty, - from table RET
Ret.Montant, - from table RET

NORET.Qty, - from table NORET
NORet.Montant, - from table NORET

OUT.Qty, - from table OUT
OUT.Montant. - from table OUT

The records should be grouped by Year/Month, of course, but also by
- each Category (I have three, A, B, and C)
- each Dimension (I have two, 48 and 60)

That means that for each Year/Month combination I should have 6 rows:
48 A
60 A
48 B
60 B
48 C
60 V
and for each row I should have totals of Qty and Amounts (named Qte and Montant, in the tables).

So for Month X the report should look like in the picture 'Table.jpg' (where Qty is the sum of Qte and $ is the sum of Amount (Montant):

I have tried with subreports, but I can't find the way to group & link them properly. Can you please, please, please give me some ideas on how to do this ?

Thank you very much.
Alex.

Madhi
October 13th, 2005, 06:31 AM
You can use Cross join query

Select * from Dimension D Cross join Category C

Otherwise post sample data and the result you want