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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

report like crosstaab and not cross tab report

Status
Not open for further replies.

shahinrep

Programmer
Nov 11, 2008
12
SA
dear all now i have table name sales details with the following fields
order_number
order_date
item_number
Item_group
sales_Qty
Sales_price


how can i make the report quarter date like this

item_group :1
----------
Q1 Q2 Q3 Q4

Qty SS Qty SS Qty SS Qty SS

item 1 1 5 25 20 10 24 350 254
item 2 5 7 25 25 17 29 34 21
item 3 11 9 25 29 19 12 45 99


item_group :2
----------
Q1 Q2 Q3 Q4

Qty SS Qty SS Qty SS Qty SS

item 1 1 5 25 20 10 24 350 254
item 2 5 7 25 25 17 29 34 21
item 3 11 9 25 29 19 12 45 99




now
Q1 = month ( 1,2,3 / 2008 )
Q2 = month ( 4,5,6 / 2008 )
Q3 = month ( 7,8,9 / 2008 )
Q4 = month ( 10,11,12 / 2008 )


Qty SS
qty= sum of the Quantity sold
ss = sum of the (quanitity * sales price )


cross tab report not work please advice me


best regards








 
You should be able to do this in a crosstab except that the summaries would be vertical instead of horizontal. Is that the only problem you were having?

-LB
 
yes
this is what i need the summary will be like you said

is there any advice
 
I've not used anything older than 8.5, but my experience is that Crosstabs guide you through everything. Try it, then ask again if you have problems.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
You could create a manual crosstab. First insert a group on Item_Group and then on Item#. Then create 8 conditional formulas like this:

//{@1stQtrqty}:
if {table.date} in Calendar1stQtr then {table.qty}

//{@1stQtrSS}:
if {table.date} in Calendar1stQtr then {table.qty}*{table.price}

Repeat for other quarters. Then place these formulas in the detail section and insert sums on them at the item# group level and suppress the detail section and item# group header section. Drag the item# groupname into the group footer.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top