[CLOSED] define syntax - how to break logic? (i want to double count)
define field "Colors" IF Color EQ 'BLU' THEN 'Blue' ELSE IF Color EQ 'GRN' THEN 'Green' ELSE IF Color EQ 'YLW' THEN 'Yellow' ELSE IF Color IN('BLU','GRN') THEN 'Blue or Green' ELSE 'N/A'
then I can filter out the N/A
So my summary table would look like this -
Colors Count
Blue 10
Green 20
Yellow 40
Blue or Green 30
Know what I mean?This message has been edited. Last edited by: Kerry,
wFDS: 7.7.03, OS: Windows, Output: Mostly Excel
January 28, 2013, 12:47 PM
Jump_faster
Can you please explain what are you trying to do or what are you trying to achieve.
WebFOCUS 7.7. Windows Server 2008. All Outputs.
WEBFOCUS 7.6.11. Windows Server 2003. All Outputs.
January 28, 2013, 03:44 PM
Waz
This should be quite simple.
FML should do this easily.
Check out the documentation.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
January 28, 2013, 04:11 PM
RSquared
defines do not work that way. once it meets a value it will drop out. the way I would do it is something like this /* DEFINE FILE BLUE_CNT/I6-IF Color EQ 'BLU' THEN 1 ELSE 0; GREEN_CNT/I6-IF Color EQ 'GRN' THEN 1 ELSE 0; YELLOW_CNT/I6-IF Color EQ 'YLW' THEN 1 ELSE BLUE_GRN_CNT/I6-IF IF Color IN('BLU','GRN') THEN 1 ELSE 0; END TABLE FILE SUM BLUE_CNT GREEN_CNT YELLOW_CNT BLUE_GRN_CNT
WF 7.6.11 Oracle WebSphere Windows NT-5.2 x86 32bit
January 28, 2013, 06:25 PM
FrankDutch
Mcguyver is a possible way or you can use hold files You try to use the same figures in two selections. One for blue or green and one for blue and green.
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
January 29, 2013, 03:55 PM
reportmasterlvl3
my company's vendor who we get devstudio from didnt include FML, for some reason...
wFDS: 7.7.03, OS: Windows, Output: Mostly Excel
January 29, 2013, 04:03 PM
Waz
My understanding is that Dev Studio is unrestricted.
Pity it would have worked.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
January 29, 2013, 05:28 PM
FrankDutch
Then try mcguyver Once you understand the technic you are going to love it.
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
January 30, 2013, 08:16 AM
Tom Flynn
FML is always available in WebFOCUS, it is not a separate license. Use Report Painter, and, paste this into a new fex. From the Creating Financial Reports document here... You'll need to log in to Tech Support...
TABLE FILE FINANCE
SUM
FINANCE.TOP.AMOUNT
ACROSS HIGHEST FINANCE.TOP.YEAR
FOR
FINANCE.TOP.ACCOUNT
'1000' AS 'UTILITY PLANT' LABEL UTP OVER
'1010' TO '1050' AS 'LESS ACCUMULATED DEPRECIATION' LABEL UTPAD OVER
BAR OVER
RECAP UTPNET=UTP-UTPAD;
AS 'TOTAL PLANT-NET' OVER
BAR OVER
'2000' TO '3999' AS 'INVESTMENTS' LABEL INV OVER
"CURRENT ASSETS" LABEL R7 OVER
'4000' AS 'CASH' LABEL CASH OVER
'5000' TO '5999' AS 'ACCOUNTS RECEIVABLE-NET' LABEL ACR OVER
'6000' AS 'INTEREST RECEIVABLE' LABEL ACI OVER
'6500' AS 'FUEL INVENTORY' LABEL FUEL OVER
'6600' AS 'MATERIALS AND SUPPLIES' LABEL MAT OVER
'6900' AS 'OTHER' LABEL MISC OVER
BAR OVER
RECAP TOTCAS=CASH+ACR+ACI+FUEL+MAT+MISC;
AS 'TOTAL CURRENT ASSETS' OVER
BAR OVER
'7000' AS 'DEFERRED DEBITS' LABEL DEFDB OVER
BAR OVER
RECAP TOTAL=UTPNET+INV+TOTCAS+DEFDB;
AS 'TOTAL ASSETS' OVER
BAR AS '='
HEADING CENTER
"COMPARATIVE ASSET SHEET </2"
FOOTING
"</2 *** PRELIMINARY ASSET SHEET BASED ON UNAUDITED FIGURES ***"
WHERE YEAR EQ '1983' OR '1982';
ON TABLE NOTOTAL
END