October 01, 2007, 09:49 AM
DanielPie Graph from 3 Data Files
Hi,
I tried to generate a pie graph with the data from 3 data files. Each data file has only one row, like this:
FOCLIST | Count(A)
1 | 44320
Now I would like to have one Pie with three pieces. Like this:
http://www2.zero-hour.de/pie.jpgThank you for your help.
Best regards
Daniel
October 01, 2007, 10:20 AM
GamPDaniel,
Before you can start creating the graph, first concatenate the three files.
You can do this in several ways, for instance have the three reports write to the same file using the FILEDEF ... (APPEND statement.
You could also use the DOS TYPE file >> otherfile syntax.
Once the data is in the same data file you can start to create your graph.
GamP
October 02, 2007, 06:34 AM
DanielHi,
I used the function(?) 'MORE'.
This is my code:
TABLE FILE MAX037DB
PRINT
MAX037DB.SEG01.COUNT_DISTINCTB_MATANFO_POS_ID_ AS 'A'
BY MAX037DB.SEG01.FOCLIST AS 'FOCLIST'
ON TABLE HOLD AS HOLD1
MORE
FILE MAX038DB
MORE
FILE MAX039DB
END
GRAPH FILE HOLD1
PRINT *
ACROSS FOCLIST
ON GRAPH SET LOOKGRAPH PIEMULTI
.
.
.
ENDSTYLE
END
The result looks like this now:
http://www2.zero-hour.de/pie.pngHow can I make the left pie invisible?
Tanks Daniel
October 02, 2007, 06:49 AM
GamPDaniel,
Try to do:
GRAPH FILE HOLD1
PRINT COUNT_DISTINCTB_MATANFO_POS_ID_
ACROSS FOCLIST
ON GRAPH SET LOOKGRAPH PIEMULTI
.
.
.
ENDSTYLE
END
This should do the trick.
October 02, 2007, 06:54 AM
DanielThank You very much - your solution works perfect!