IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    how to display total count value of field in graph as first series
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Member
Posted
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
 
Posts: 6 | Location: chennai | Registered: June 03, 2008Reply With QuoteEdit or Delete MessageReport This Post
Master
Posted Hide Post
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 764 on WinXP (sp2) - IE7.
- Also available are versions from 534 up to 766 on Windows (XP/2000/2003EE)
 
Posts: 518 | Location: Netherlands | Registered: September 25, 2007Reply With QuoteEdit or Delete MessageReport This Post
Virtuoso
Posted Hide Post
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.6.5 with 7.6.6 WFRS; AIX 5.2; WebSphere 6.1.0.15
Dev: WF 7.6.5 with 7.6.6 WFRS; AIX 5.3; WebSphere 6.1.0.15
Primarily self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable
 
Posts: 1534 | Location: BNSF: Fort Worth, TX | Registered: April 05, 2006Reply With QuoteEdit or Delete MessageReport This Post
Member
Posted Hide Post
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
 
Posts: 6 | Location: chennai | Registered: June 03, 2008Reply With QuoteEdit or Delete MessageReport This Post
JG
Master
Posted Hide Post
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
 
Posts: 937 | Registered: February 24, 2005Reply With QuoteEdit or Delete MessageReport This Post
Master
Posted Hide Post
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 764 on WinXP (sp2) - IE7.
- Also available are versions from 534 up to 766 on Windows (XP/2000/2003EE)
 
Posts: 518 | Location: Netherlands | Registered: September 25, 2007Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    how to display total count value of field in graph as first series

Copyright © 1996-2008 Information Builders, leaders in enterprise business intelligence.