Click here to Skip to main content
15,895,606 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
SQL

Hi
I am looking for some assistance on how to display ONLY the TOP 10 results say by Revenue.

For example I am running a query for lets say 30 customers over a given date range. Which returns the values for all the customers as required. However on the last page of the report I am looking to display the grand totals for the report along with graphs displaying the TOP 10 results ONLY.
Presently the graph displays all the results which is not what I am looking to achieve - I would appreciate any assistance on this

Kind Regards

Jack
Posted
Updated 18-Feb-14 1:27am
v2
Comments
thatraja 18-Feb-14 7:40am    
Include screenshots of chart
jchander4 18-Feb-14 8:24am    
sorry for the delay was in a meeting please find picture on http://i.imgur.com/kUpME8n.png

any assistance will be appreciated. As you will see the results of the graph are displaying all the customers on the results however I only was to display the top 10 on the graphs only the rest of the report needs to remain as it displaying the results for each customer which are broken down by customer and date and then grand total for the whole report on the last page with graphs displaying graphical results

Many Thanks
thatraja 18-Feb-14 8:46am    
Probably you have to apply filter like limiting rows on db side or report side. I don't know how you're generating reports? what tool? any coding? In Crystal reports, you could use formulas in chart settings
jchander4 18-Feb-14 8:54am    
Hithe report is building records on all movements with details against each movement and then I summarise at change of date for each customer id and then a summary at the end of each customer with a grand total for the whole report at the end of the report when the graphs are displayed.
the groups I am using are
date
customer id
movement id
all the data being displayed is correct and the summary totals along with the grand totals display correctly too;
However the graphs at the end of the report I just wanted to display the top 10 for the whole report. that is where I am having difficulties and not sure how to attack the issue
thatraja 18-Feb-14 9:01am    
Ok but still you didn't mention about tools & coding :| Share the chart related portion, atleast I could guess something

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900