Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cross tabulate report
Message
From
13/05/1997 14:20:35
 
 
To
13/05/1997 11:11:54
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordan
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00031927
Message ID:
00032021
Views:
54
Because of the nature of each column reflecting different records and other factors this is an awkward report. I would suggest a structure with 12 memo fields per record, and 1 record per item code. Then you could loop through the shipments constructing the memo field contents. I only suggest all of this because of the report payout, which really doesn;t fit with any of the limited pardigms of the VFP report writer.

CREATE CURSOR Output_ ;
( Code N(4), ItemName C(30), Month1 M, Month2 M, ... Month12 M)

APPEND FROM Master
USE Shipment IN 0 ORDER

PRIVATE lcMemo

SELECT Output_
SCAN
SELECT Shipment
SCAN FOR Code = Output_.Code && or SEEK, SCAN WHILE
lcMemo = "month" + LTRIM( STR( MONTH( ShipDate)))
SELECT Output_
REPLACE (lcMemo) WITH &lcMemo + ;
CTOD( ShipDate) + STR( Quantity) + CHR(13) + CHR(10)
.. or whatever formatting you want

SELECT Shipment
ENDSCAN

SELECT Output_
ENDSCAN

When done, you can just create a simple report from the Output_ cursor. To eliminate unshipped products, you could REPORT FORM ... FOR NOT EMPTY( Month1) OR NOT EMPTY( Month2) OR ...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform