May 23, 2006, 05:22 AM
Karanth2 reports in one excel sheet
Hi,
I want something like
TABLE FILE CAR
PRINT
COUNTRY
ON TABLE PCHOLD FORMAT EXL2K
END
TABLE FILE CAR
PRINT
MODEL
ON TABLE PCHOLD FORMAT EXL2K
END
Only the 1st one comes in the excel sheet.
How do i show both reports in the same ecel sheet?
May 23, 2006, 06:10 AM
Tony AKaranth,
There was a recent posting that described how to do this by J.G. (I think). Try the Find function to locate it.
T
May 23, 2006, 09:07 AM
KameshAs Tony Said, you can find the recent post about this posted by JG OR you can get this by using the code below,
TABLE FILE CAR
PRINT
COUNTRY
ON TABLE PCHOLD FORMAT EXL2K OPEN NOBREAK
END
TABLE FILE CAR
PRINT
MODEL
ON TABLE PCHOLD FORMAT EXL2K CLOSE
END
May 23, 2006, 09:15 AM
Tony AQuite right Kamesh, however I was thinking more along the lines of two reports - two worksheets (or "tabs").
This code will provide seperate worksheets using BYTOC -
DEFINE FILE CAR
BREAK1/A20 = 'COUNTRY';
BREAK2/A20 = 'CAR';
BREAK3/A20 = 'MODEL';
END
MATCH FILE CAR
PRINT COUNTRY
BY BREAK1 AS BREAK
RUN
FILE CAR
PRINT CAR
BY BREAK2 AS BREAK
RUN
FILE CAR
PRINT MODEL
BY BREAK3 AS BREAK
AFTER MATCH HOLD OLD-OR-NEW
END
TABLE FILE HOLD
PRINT COMPUTE DATAFIELD/A30 = IF BREAK EQ 'COUNTRY' THEN COUNTRY
ELSE IF BREAK EQ 'CAR' THEN CAR ELSE MODEL;
BY BREAK
ON TABLE PCHOLD FORMAT EXL2K BYTOC
END
T
May 23, 2006, 09:31 AM
KameshTony,
This one is good to know. I used to write compound report to get in to separate excel sheet.
Good, atleast I learn something today.