Hey all,
I'm trying to use a chart to display fiscal data. Everything is working, however, the date, on the bottom axis(formatted as Apr '06 etc..), is being sorted alphabetically. (ie Apr, Aug, Dec etc...).
I'm trying to sort this by month (Apr, May, Jun etc...) but every time I try, I get the 'ol "Query does not include specified expression 'krDate' as part of an aggregate function."
I am familiar with SQL but I cannot get this chart to sort the way I want it.
This is the SQL that the Chart Wizard created (the ORDER BY krs.krDate) was added by myself and creates the error:
SELECT (Format([krDate],"mmm"" '""yy")) AS Expr1, Sum(krs.krAmount) AS SumOfkrAmount
FROM krs
WHERE (((krs.krDate) Between calcDateByPeriodFrom() And calcDateByPeriodTo()))
GROUP BY (Format([krDate],"mmm"" '""yy")), (Year([krDate])*12+Month([krDate])-1)
ORDER BY krs.krDate;
I tried using ORDER BY (Format([krDate],"mmm"" '""yy")) but once again it's sorting alphabetically.
Thx in advance,
Dave
I'm trying to use a chart to display fiscal data. Everything is working, however, the date, on the bottom axis(formatted as Apr '06 etc..), is being sorted alphabetically. (ie Apr, Aug, Dec etc...).
I'm trying to sort this by month (Apr, May, Jun etc...) but every time I try, I get the 'ol "Query does not include specified expression 'krDate' as part of an aggregate function."
I am familiar with SQL but I cannot get this chart to sort the way I want it.
This is the SQL that the Chart Wizard created (the ORDER BY krs.krDate) was added by myself and creates the error:
SELECT (Format([krDate],"mmm"" '""yy")) AS Expr1, Sum(krs.krAmount) AS SumOfkrAmount
FROM krs
WHERE (((krs.krDate) Between calcDateByPeriodFrom() And calcDateByPeriodTo()))
GROUP BY (Format([krDate],"mmm"" '""yy")), (Year([krDate])*12+Month([krDate])-1)
ORDER BY krs.krDate;
I tried using ORDER BY (Format([krDate],"mmm"" '""yy")) but once again it's sorting alphabetically.
Thx in advance,
Dave