Focal Point
HOW TO DISPLAY A SPECIFIC NUMBER OF RECORDS?

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

June 23, 2006, 01:37 PM
MARIELOS
HOW TO DISPLAY A SPECIFIC NUMBER OF RECORDS?
Hello to everybody:

I have a report of 100 customer, but I need to display the 30 main customers, I'm using BY HIGHEST but how can I get just the 30 customers...??

Thanks...!!

Product: webfocus 7.1.1.
June 23, 2006, 01:57 PM
dwf
BY HIGHEST 30 CUST


dwf
June 23, 2006, 02:02 PM
KevinG
Marielos,

From the WF Doc...

Example: Ranking and Restricting Sort Field Values
Ranking sort field values is frequently combined with restricting sort field values by rank, as in the following example.

TABLE FILE EMPLOYEE
PRINT LAST_NAME
RANKED BY HIGHEST 5 CURR_SAL
END
The output is:

RANK
CURR_SAL LAST_NAME

1 $29,700.00 BANNING
2 $27,062.00 CROSS
3 $26,862.00 IRVING
4 $21,780.00 BLACKWOOD
5 $21,120.00 ROMANS

Hope this helps,

Kevin


WF 7.6.10 / WIN-AIX
June 23, 2006, 04:18 PM
MARIELOS
Thanks Kevin It's good idea using Rank, but let me tell you that I'm doing a group by the sum and my out-put is like this:

1- Irving
$30.00
10.00
5.00
------
$45

2- Kevin
25.00
10.00
2.00
------
$37.00

Then I need to display the 30 names that have the highest value (sum)

By the way is there another way to number the names of customers, the problem with Rank is the title, or can I change it??

Thank you very much,
June 23, 2006, 04:33 PM
KevinG
Marielos,

Yes, you can change the title of RANK.

RANKED AS 'My Title' BY HIGHEST 30 PROD_CODE.

Have to run quickly, but will get back to you on the sub-total.

Kevin


WF 7.6.10 / WIN-AIX
June 26, 2006, 08:46 AM
<RickW>
The LIST command might work. Maybe something like this;

TABLE FILE STUFF
SUM AMOUNT AS TAMT
BY NAME
SUM AMOUNT
BY NAME
BY PRODCODE
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS H1
END
TABLE FILE H1
LIST *
BY HIGHEST TAMT NOPRINT
ON TABLE HOLD AS H2
END
TABLE FILE H2
PRINT *
WHERE E01 LE 30
END
June 26, 2006, 03:47 PM
TexasStingray
BY HIGHEST TOTAL CUST
IF RECORDLIMIT EQ 30




Scott