Trend Graph (Sales % Increase) write(WriteCustomSelections())
var Rank ="0"; cursor = database.cursor( "Select Year, s.Month, m.MonthName, "+ " SUM(CurrentSales) SumCurrentSales, "+ " SUM(PriorSales) SumPriorsales, "+ " (SUM(CurrentSales) / SUM(PriorSales)-1.0)*100 Inc "+ "FROM SalesInformation s, MonthReference m, Product p, Customer c "+ "WHERE m.Month = s.Month " + "AND s.CustID = c.CustID " + "AND s.ProdID = p.ProdID "+ BuildQuery(client.CustID, client.ProdID, client.CustGroupID, client.ProdGroupID)+ "GROUP by year, s.Month, MonthName " + "ORDER by year, s.Month "); while( cursor.next() ) { Rank = parseInt(Rank,10) + 1; write("\n"); write("\n"); } cursor.close();