Having trouble with a simple graph/chart

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Having trouble with a simple graph/chart

Post by Jaymer »

Now that aware has improved the graphing abilities, I thought I'd re-visit this topic.
But on my 1st graph, I'm having trouble.

Take a Customer file of 500 records.
You want to see a simple chart (bar/column) of Sales (RO = Repair Orders in these examples) to determine the top 10-20 customers - you certainly can't see ALL Customers because there'd be too many bars.
Even if it was just "Sales for this month", it could be too many bars. So the time frame isn't the issue (meaning a simple WHERE clause for just this month won't solve this).

If Aware, here's what I can do (which doesn't work because there's no facilities in the charting config to sort/limit the data):

Code: Select all

FIND RO WHERE RO.DateCreated BETWEEN '1/1/2019' and '3/31/2019'  
In SQL, here's what works to get the exact data I need for the chart:

Code: Select all

SELECT top(10) CustName, SUM(RO.ro_grandntotal_nodisc)
FROM RO
WHERE RO.DateCreated BETWEEN '1/1/2019' and '3/31/2019'  
GROUP BY CustName
ORDER BY SUM(RO.ro_grandntotal_nodisc) DESC
Comparing this code, you see the SQL back end does the Aggregating (with SUM) and the Limit (with top(10)) and the Sort (with Order By).
Aware's chart mechanism offers only the Aggregating portion. And thats why this simple chart can't be done (at least by the Aware users who wish to stay "native aware").

So I ask the group: How can I get this simple chart done?

thx
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
ACDC
Posts: 1138
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: Having trouble with a simple graph/chart

Post by ACDC »

here's what I can do (which doesn't work because there's no facilities in the charting config to sort/limit the data):
In these situations, the only way is to build a chart specific object(s) and then once the chart objects are created, show the chart data.
Post Reply