Focal Point
Customer Column Totals Row

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

June 29, 2007, 11:46 AM
KK
Customer Column Totals Row
Hi,

I have a report where

1) I need display column totals for 6 columns out of 12, because the remaining 6 are percentages. And I would like to add calculated column total for 3 other columns.
For e.g if I have

1 2 3 4 5 6 7 8 9 10

I want column totals for 1, 2, 4 and 5 columns and calculated columun totals for 3 (column1/column2 * 100), 6, and 7.

2) I need to display
--The top 10 customers' sales totals (which is question 1 given above)
--The remaining customers' sales totals and
--The total customers (top 10 + remaining customers) sales totals

For e.g if I have 50 customers in total,
I need to display totals for top 10, remaining 40 and total(i.e. 50) customers sales.

TABLE FILE TEST
SUM

CURRENTSALES/D12C AS 'Sales'
CURRENTBP/D12C AS 'BP'

RANKED AS 'RANK' BY TOTAL HIGHEST 10 CURRENTSALES NOPRINT
BY NAME AS 'Customer'
ON TABLE COLUMN-TOTAL AS 'TOTAL'
END

I tried "others" but its adding total as a subfoot which is not exactly what I am looking for. I would like this to be a custom row right above the COLUMN TOTAL ROW.

Any sample code would be of great help.

KK

This message has been edited. Last edited by: KK,


Test - Webfocus 7.6.7
Prod - Webfocus 7.6.7
Win2003
Sql Server 2000 and 2008
June 29, 2007, 11:57 AM
Darin Lee
for item 1, if you have those formulas (formulae?)as computed columns, you can just use ON TABLE RECOMPUTE and you get exactly what you're asking for. Your other item is also in a separate post so I'll let it be adressed there


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
July 02, 2007, 11:23 AM
ira
To get the 'others' besides the top use the 'others' feature in 6.6 (i believe).

As for tallying particular columns - oyu can use that inn a subfoot by using left caret ct. fieldname follwed by right caret. to get the calculated columns use recompute - it works like a charm. good luck!

Ira


aix-533,websphere 5.1.1,apache-2.0,
wf 538(d), 537 (p),
==============
7.6.11 (t) aix 5312
websphere 6.1.19
apache 2.0
July 12, 2007, 10:23 AM
Kerry
Hi KK,

Has this issue been resolved? Many thanks to Darin and Ira's input. Smiler

Please try the following (this is a feature in 76):

Input data:
Office Sales
ABC 10,000
MNO 6,000
DEF 9,000
JKL 7,000
GHI 8,000
PQR 5,000
VWX 3,000
STU 4,000



TABLE FILE xxx
PRINT OFFICE
BY HIGHEST 5 SALES PLUS OTHER
END

Output:
10,000 ABC
9,000 DEF
8,000 GHI
7,000 JKL
6,000 MNO
12,000 ??? <==Sum of 5000+4000+3000

PLUS OTHER creates one more row of all records that do not fall into
the explicit rows displayed
Works with RANKED, IN-GROUPS-OF, IN-RANGES-OF (not with TILES)


Hope this helps. Big Grin

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
July 12, 2007, 10:49 AM
FrankDutch
that "and others" is a great new functionality.
In the former version I did this by first putting all the data with the rank field into a hold file and than define some fields bases on the ranking

DEFINE FILE HOLD
NEWRANK/I4=IF RANK LE 10 THEN RANK ELSE 9999;
END

TABLE FILE HOLD
SUM XXX
BY NEWRANK
ON TABLE COLUMN-TOTAL
END

for the customer name you need to create a dummy name that holds the real name if the rank is less than 11 and else is something like 'others'.




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

August 08, 2007, 03:38 PM
KK
quote:
Originally posted by kerry:


Kerry,

This issue has not been resolved yet. I have 5 columns sales amount, stdcost, gp%, bp amount, bp gp%.

If I use OTHER, it gives other totals of all the columns which I don't want. I want OTHER only for the sales amount. And gp% to be calculated based on the other total sales amount and other total std cost.

Please advise.

Thank you.


Test - Webfocus 7.6.7
Prod - Webfocus 7.6.7
Win2003
Sql Server 2000 and 2008
August 08, 2007, 04:31 PM
FrankDutch
Please take a look at my solution, it will do what you need.




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

August 09, 2007, 09:18 AM
KK
Frank,

I will try your sample code.

Thanks,
KK

This message has been edited. Last edited by: KK,


Test - Webfocus 7.6.7
Prod - Webfocus 7.6.7
Win2003
Sql Server 2000 and 2008