|
Go
![]() |
New
![]() |
Search
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Platinum Member |
I have a graph created that I would like to add a "total" line to. It seems like something relatively simple and I'm sure I'm just not thinking of the right compute or something. Hoping someone can help.
Here's my example: GRAPH FILE CAR SUM RETAIL_COST AS '' ACROSS BODYTYPE BY COUNTRY ON GRAPH SET LOOKGRAPH VLINE ON GRAPH SET 3D OFF ON GRAPH SET GRMERGE ON ON GRAPH PCHOLD FORMAT PNG ON GRAPH SET GRAPHSTYLE * setPlace(true); ENDSTYLE END As you can see, the graph produces 1 line for each country -- which is what I want. But in addition, I'd like to have another line on the graph that represents the sum-total for all countries for each bodytype (BODYTYPE still remaining the ACROSS). Any help is appreciated! Production: 7.6.6 WF Server  <=>  7.6.6 WF Client  <=>  7.6.6 Dev Studio Testing: <none> Using MRE & BID.  Connected to MS SQL Server 2005 Output Types: HTML, Excel, PDF |
||
|
|
Expert |
The short answer is that you would have to manufacture the data row, something like this example:
TABLE FILE CAR SUM RETAIL_COST COMPUTE COUNTRY/A10 = '_TOTAL'; BY BODYTYPE ON TABLE HOLD AS HTOT END GRAPH FILE CAR SUM RETAIL_COST AS '' ACROSS BODYTYPE BY COUNTRY ON GRAPH SET LOOKGRAPH VLINE ON GRAPH SET 3D OFF ON GRAPH SET GRMERGE ON ON GRAPH PCHOLD FORMAT PNG ON GRAPH SET GRAPHSTYLE * setPlace(true); ENDSTYLE MORE FILE HTOT END I wish there was an easier way to generate total lines AS PART OF THE DATA. You could use FRL (Financial Reporting Language), but that can get fairly complicated (in my humble opinion) and I don't know if it will work for GRAPH. Francis Env 1: WebFOCUS 5.3.2 Servlet - MRE/BID/Self Service/ReportCaster - MS Windows Server 2003 - IIS/New Atlanta ServletExec - MS SQL Server 2000 - DataMigrator 5.3.4 Env 2: WebFOCUS 7.6.5 Servlet - MRE/BID/Self Service - MS Windows XP SP2 - Apache Tomcat/5.5.25 - MS SQL Server 2000 Env 3: WebFOCUS 5.3.3 CGI - Self Service - AIX 5.2 - IBM DB2 Output formats: HTML, Excel 2000 and PDF |
|||
|
|
Platinum Member |
Aside from the extra pass, that's really not that bad. I made it work on my graph and I think the result is what the user is after.
Thanks for the quick response! Production: 7.6.6 WF Server  <=>  7.6.6 WF Client  <=>  7.6.6 Dev Studio Testing: <none> Using MRE & BID.  Connected to MS SQL Server 2005 Output Types: HTML, Excel, PDF |
|||
|
|
Expert |
i totally second Francis's method; that's exactly what we do, we build a total IFF the group has a multilines; so if a COUNTRY had only 1 bodytype , we don't do a TOTAL.
I take 2 passes: 1: to create the granular detail, then 2: define against the granular and read to create a total set, IFF the cnt.dst.bodytype GT 1. Then (be sure to clear the defines against the granular) glue together with a MORE.
|
|||||
|
|
Member |
This was very helpful.
WebFocus 7.11/7.6 |
|||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|

