Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Top 5 1

Status
Not open for further replies.

sgd3476

Programmer
Mar 3, 2003
37
US
These seems obvious, but I can't get it to work. I have a simple report. A client has a list of stocks, I'm showing the issue name, market value and tax cost, subtotalled at the end. I just want to display the top 5 assets by market value.
Thanks,
Kelly
 
do you want the top 5 records, or the top 5 groups?

To get the top 5 records, just sort in the desired manner and conditionally suppress the records if RecordNumber>5.

To get the top 5 groups go to report, TopN/Sort Group Expert, and follow the instructions. Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
dgilsdorf@trianglepartners.com
 
Use a TOP N report, it's one of the tabs within the report expert.

I think that you group by issue name, and then do a total on market value and in the TOP N select TOP 5.

-k
 
Now it really works, can I print subtotal of the market value the top 5?
 
I'm displaying the top 5 issues in an account by market value. I would like to subtotal just the top 5 values, not the entire list of issues.
 
Sorry, I don't understand the requirement, hence the request for example data and expected output.

If you're grouping only by Accounts, you'll get the top 5 accounts.

If you're grouping only by issues, you'll get only the top 5 issues.

-k
 
no, I'm sorry, let me illustrate.

Issue Name MV

ibm 50000
mrk 10000
ge 5000
cvs 3000
jnj 1000

I want a subtotal line that say's $69,000. When I subtotal, I get 4,000,000 because that's how many bonds and equity the account holds, not just the top 5 equity.
 
Use the groupby and top 5 method instead of the recordnumber >5

You may need to create a group you don't need (ie issuename) but it will make the rest easier.

Lisa
 
Are these individual records, or groups?

If they are records, write a running total field that only evaluates if recordNumber<=5.

If they are groups and you are using a TopN report, create a running total that only evaluates if GroupNumber <=5. Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
dgilsdorf@trianglepartners.com
 
Ahhh, OK, you want the grand total.

I think that dgillz has it here, if not, let us know.

-k
 
YES! It was the running total field, But I did not need to evaluate for topn. When I put in the formula to evaluate for records less than top 5, I got error msg, can't put print formula in at run time, etc.

Thanks so much for the awesome help. This site is great!
K
 
I need a little more help on this report....so far I have this
market val
Equity Exxon 400,000
Equity EMC 100,000
Equity NOK 125,000
Equity MRK 250,000

Client would like report modified to show percentage each asset is of entire account. There is a select issues = equity, I took that out to get percentages of total account. Now Bonds are appearing, How can I filter out bonds while still getting percentage of total account?

ASSETClass Security MV % of Port
Bond USTBOND 100,000 .20%
Equity Exxon 400,000 .40
Equity EMC 100,000 .10
Equity NOK 125,000 .12
Equity MRK 250,000 .35


I don't want the BOND to Show, just top 5 equities by Market Value.

Thanks!


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top