Focal Point
how to display total count value of field in graph as first series

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4811061003

September 22, 2008, 07:53 AM
sure
how to display total count value of field in graph as first series
hi
i am able to display count value of the field in graph but i am not able to display total count value in graph as first series. Please find below the sample coude of the report.



DEFINE FILE CAR
CARCNT/I4=1
END

GRAPH FILE CAR
-* Created by Advanced Graph Assistant
SUM CNT.CAR.BODY.RETAIL_COST
BY CAR.COMP.CAR
HEADING
" TOTAL COUNT VALUE:ON GRAPH PCHOLD AS HOLD FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBISouthWestern.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDepthRadius(5);
setPlace(true);
setTransparentBorderColor(getSeries(0),true);
setTransparentBorderColor(getSeries(1),true);
setTransparentBorderColor(getSeries(2),true);
setTransparentBorderColor(getSeries(3),true);
setTransparentBorderColor(getSeries(4),true);
setTransparentBorderColor(getSeries(5),true);
setTransparentBorderColor(getSeries(6),true);
setTransparentBorderColor(getSeries(7),true);
setTransparentBorderColor(getSeries(8),true);
setTransparentBorderColor(getSeries(9),true);
setTransparentBorderColor(getSeries(10),true);
setSeriesType(0,0);
setTextString(getLegendLabel(0),"THIS IS VENKAT setDisplay(getLegendLabel(0),true);
setDisplay(getDataText(),true);
setData(0,);
ENDSTYLE
END

END

If anyone give the solution for this problem ,

its more help to me

Thanks
suresh


WebFocus 7.1.6
September 22, 2008, 09:35 AM
GamP
Do you mean you want the total count to be the first bar of your graph?
If so, then you can do this with the aid of hold files.
DEFINE FILE CAR
CARTOT/A16='  ALL';
END

TABLE FILE CAR
SUM CNT.CAR.BODY.RETAIL_COST
BY CARTOT
ON TABLE HOLD
END
-SET &RECS = &RECORDS;

FILEDEF HOLD DISK HOLD.FTM (APPEND

TABLE FILE CAR
SUM CNT.CAR.BODY.RETAIL_COST
BY CAR.COMP.CAR
ON TABLE HOLD
END

GRAPH FILE HOLD
-* Created by Advanced Graph Assistant
SUM RETAIL_COST
BY CAR
HEADING
" TOTAL COUNT VALUE: &RECS"
ON GRAPH PCHOLD AS HOLD FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBISouthWestern.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDepthRadius(5);
setPlace(true);
setTransparentBorderColor(getSeries(0),true);
setTransparentBorderColor(getSeries(1),true);
setTransparentBorderColor(getSeries(2),true);
setTransparentBorderColor(getSeries(3),true);
setTransparentBorderColor(getSeries(4),true);
setTransparentBorderColor(getSeries(5),true);
setTransparentBorderColor(getSeries(6),true);
setTransparentBorderColor(getSeries(7),true);
setTransparentBorderColor(getSeries(8),true);
setTransparentBorderColor(getSeries(9),true);
setTransparentBorderColor(getSeries(10),true);
setSeriesType(0,0);
setDisplay(getLegendLabel(0),true);
setDisplay(getDataText(),true);
setData(0,);
ENDSTYLE
END

This will produce the total as the first bar in the graph.
If this is not what you want it to be, then please explain further.

Hope this helps...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
September 22, 2008, 09:36 AM
GinnyJakes
I'm not quite sure what you mean but can't you do a SUM CARCNT in addtion to what you already have?

Another option is to do your summing ahead of time, hold it, and do the graph on the hold file.

Now a couple of housekeeping things since you are a new poster.

Please update your profile signature with your products, releases, and platforms so that we can better help you. Check the signature reminder post for details.

Also post your code inside the code brackets , the rightmost icons above the reply box. We didn't get your whole graph.

But we do appreciate you doing it on the CAR file.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
September 23, 2008, 05:25 AM
sure
Hi all,

here is a sample code, in that getting total count value of the field as a first row in tabular report. like that i want to display total count value of the field as a first bar and also display individual count values of the field in graph.

DEFINE FILE CAR
CARCNT/I4 =1;
END
TABLE FILE CAR
SUM CNT.CAR AS ' '

BY COUNTRY AS ' '
HEADING
"TOTAL RECORDS ON REPORT < TOT.CARCNT"
END


Please do help in this regard.

Thanks
sure


WebFocus 7.1.6
September 23, 2008, 05:49 AM
<JG>
DEFINE FILE CAR
CARCNT/I4 =1;
END
TABLE FILE CAR
SUM CNT.CAR
BY COUNTRY
ON TABLE HOLD AS DATA
END
-RUN
FILEDEF DATA DISK DATA.FTM (APPEND
-RUN
TABLE FILE CAR
SUM
COMPUTE COUNTRY/A10=' ';
CNT.CAR
ON TABLE HOLD AS DATA
END
-RUN
September 23, 2008, 08:44 AM
GamP
Sure,

Please look at my first entry in this post, this will give you exactly what you're asking.
Which is about the same as JG just offered.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988