Link to home
Start Free TrialLog in
Avatar of rustypoot
rustypootFlag for United States of America

asked on

Crystal Reports - Top 20 Rows with Highest Revenue

I am attaching the report file. I just want to see the TOP 20 Rows with HIGHEST TOTAL AMOUNT field. I am not sure how to do it as I do not have any Groups in the report. Please let me know. Thanks
Top-20-Accounts-YTD.rpt
Avatar of MOA81
MOA81
Flag of Jordan image

Hello



1-right click on the details section and click "section expert"
2-on the sections list, click details sectio
3-leave the check box cleared and click the "X+2" command button next to the supress  (no drill down) the formula editor opens
4-type the formula
remainder(recordnumber,20)<>0
5. save your fuormula
click ok

make sure to sort the record desc to get the highest top 20
Avatar of rustypoot

ASKER

Thanks for getting back to me. But it did not work. It still returns more than half the records! Can you please look at the file that I attached and let me know.? Thanks
Avatar of Mike McCracken
Mike McCracken

Is the total amount a calculated field as a summary?

One way os to group on a field then you can use the group sort expert to limit you to the top N if the total is a summary

If it isn't a summary try this
Suppression formula
RecordNumber > 20

mlmcc
Thanks very much. Let me try this and test it.
Attached is an example of the group solution.

Watch for the grand total at the bottom. I don' t know if that will be the overall total, or the total of the top 20.
Top-20-Accounts-YTD.rpt
Thanks ALl for your Help. But I have 2 Companies (OCRC and FSM) and the User wants Top 20 for each Company! How can I do this? Also, the Group Total should be by each Company and Grand Total should be for 40 Top Rows (20 for OCRC and 20 for FSM). I have attached the file. Thanks
Top-20-Accounts-MTD.rpt
Does this do what you want?

mlmcc
Top-20-Accounts-MTD-1-.rpt
Hey There! Thanks for getting back to me. No this is not what I wanted.

I have 2 Companies - OCRC and FSM. I have grouped by these 2 Companies. I want Top 20 Gross Revenue Rows for OCRC and Top 20 Gross Revenue Rows for FSM. The totals should be just for the 20 rows for each Company and Grand Total should be for 40 rows displayed. Thanks
Since i don't have the data, i can't see what you get.

Are you getting more than 20 records?

Do the totals include morerecords?

mlmcc
As u can see in the attached rpt, I am pulling all the records for OCRC and FSM. The rpt is grouped by Company. I want TOP 20 for FSM and TOP 20 for OCRC. Also, the the report should have Totals by Company [Total of only Top 20 rows] and Grand Total [40 Rows displayed on the rpt]. Hope this helps. Thanks so much
Top-20-Accounts-MTD.rpt
The attached report should display the top 20 account numbers by revenue but total the entire amount.
Unfortunately, because your original didn't have account number on it (I am assuming account number doesn't have duplicates within a company.) I can't now see the data to fix the totals...

Populate with data and post back?

Top-20-Accounts-MTD.rpt
Thanks so much. But what did you do? B/c I have to the same changes to the YTD report. I do not see any filters or formulas! Please let me know so that I can make same changes to YTD rpt. THANKS
ASKER CERTIFIED SOLUTION
Avatar of PCIIain
PCIIain
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks