[CLOSED] Customize sum field title under certain across value
Hello, I need to customize sum fields titles under certain across value. I already have a detail and aggregated rows with total values in my data level (lets say ROWLEVEL= 0 - detail, 1 - total). In my example I just need that first sum field title become 'Total' from 'Amount' and second 'Margin' from 'Net' under ROWLEVEL value 1 (or country 'JAPAN') in my example.
DEFINE FILE CAR ROWLEVEL/I4 = IF COUNTRY EQ 'JAPAN' THEN 1 ELSE 0; END
TABLE FILE CAR SUM DCOST AS 'Amount' RCOST AS 'Net' BY CAR ACROSS ROWLEVEL ACROSS COUNTRY AS '' END
Any way to do it easily ? This message has been edited. Last edited by: FP Mod Chuck,
WebFOCUS 8 Win Server 2016 Excel, HTML
September 05, 2018, 09:42 AM
Tony A
The answer is yes and Danny-SRL mentioned it in a post from earlier today. It's always worth reading other posts as you might learn something new
You might need to play a little with the code but you should be able to understand the basic principle.
DEFINE FILE CAR
ROWLEVEL/I4 = IF COUNTRY EQ 'JAPAN' THEN 1 ELSE 0;
JDCOST/D12 MISSING ON = IF COUNTRY EQ 'JAPAN' THEN DCOST ELSE MISSING;
JRCOST/D12 MISSING ON = IF COUNTRY EQ 'JAPAN' THEN RCOST ELSE MISSING;
END
TABLE FILE CAR
SUM
JDCOST AS 'Total'
JRCOST AS 'Margin'
BY CAR
SUM
DCOST AS 'Amount'
RCOST AS 'Net'
BY CAR
ACROSS ROWLEVEL NOPRINT
ACROSS COUNTRY AS ''
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
-*ON TABLE ROW-TOTAL
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE=ENDEFLT,
$
TYPE=REPORT, COLUMN=C1, SEQUENCE=21,
$
TYPE=REPORT, COLUMN=C2, SEQUENCE=22,
$
ENDSTYLE
END
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
September 05, 2018, 10:37 AM
Vyt
Thanks for your answer but I dont think this solution fits to me because I have multiple across fields. I gave a lit bit to simple example. Made new one:
DEFINE FILE CAR ROWLEVEL/I4 = IF COUNTRY EQ 'JAPAN' THEN 1 ELSE 0; END TABLE FILE CAR SUM DCOST AS 'Amount' RCOST AS 'Net' BY CAR ACROSS SEATS ACROSS ROWLEVEL ACROSS COUNTRY AS '' END
Columns can be in the middle of report and i need them under right across values not like an additional fields at the end o report
WebFOCUS 8 Win Server 2016 Excel, HTML
September 11, 2018, 12:58 PM
FP Mod Chuck
Vyt
I think it is time for you to open a case with techsupport if this is still an issue
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats