Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Difficult 1

Status
Not open for further replies.

Leighton21

Technical User
Dec 17, 2001
83
AU
Hi All,

I have a table on which I would like to report on. The table is however difficult to get this particular information out of. As an example I will give you a few rows from this table

RecNum | ProductCode | PeriodDate | SLSQuantity
1 COMP 30/04/04 10
2 COMP 31/05/04 12
3 Del 30/04/04 1

As you can see It basically shows monthly sales statistics for products. What I am trying to do is create a report which has the products running down the side and the month running across the top i.e.
JAN FEB MARCH etc...
COMP 1 2 3
DEL ...

Looking at the data however you can see that there are multiple entries of the same product(one for each month) what I would like to do is Combine the entries for the same product and have the sales quantities for each month, this looks near on impossible since I would have to combine the same column for multiple entries (i.e. find all the entries for period date for productcode COMP and insert them into a single row. The question arises how would I know which productcode the PeriodDate would belong to.

Can anyone please help
 
Insert a crosstab. Use {table.product} as the row, and {table.date} as the column field. In the crosstab expert, highlight {table.date} after selecting it as your column field, and then click on "Group Options" and choose "print on change of month". Then add {table.SLSquantity} as your summary field, with sum as your summary.

Place the crosstab in the report header or footer.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top