By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,475 Members | 2,093 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,475 IT Pros & Developers. It's quick & easy.

Setting OrderBy For Chart

P: n/a
I have the following string for a RowSource for a chart which works fine,
except for the Sort Order for the legend. The legend appears in the Order of
Category (Alpha), but I want it in order of a field from the query
qsSumSalesCat called 'SortOrder' (Numeric).

TRANSFORM SUM(qsSumSalesCat.[SalesRate]) AS [SalesRate] SELECT sDate FROM
qsSumSalesCat WHERE PropNum = 1 AND sDate BETWEEN #07 31 2005# AND #07 31
2006# AND Category <'Z' GROUP BY sDate PIVOT Category;

I've tried inserting SortOrder as shown below, but get an error 'Syntax
Error in Transform statement'.

TRANSFORM SUM(qsSumSalesCat.[SalesRate]) AS [SalesRate] SELECT sDate,
SortOrder FROM qsSumSalesCat WHERE PropNum = 1 AND sDate BETWEEN #07 31
2005# AND #07 31 2006# AND Category <'Z' ORDER BY SortOrder GROUP BY
sDate PIVOT Category;

Any help appreciated.
--
Bob Darlington
Brisbane
Aug 25 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Found the answer. Use the ColumnHeadings property in the PIVOT bit.

--
Bob Darlington
Brisbane
"Bob Darlington" <bo*@dpcmanAX.com.auwrote in message
news:44***********************@news.optusnet.com.a u...
>I have the following string for a RowSource for a chart which works fine,
except for the Sort Order for the legend. The legend appears in the Order
of Category (Alpha), but I want it in order of a field from the query
qsSumSalesCat called 'SortOrder' (Numeric).

TRANSFORM SUM(qsSumSalesCat.[SalesRate]) AS [SalesRate] SELECT sDate FROM
qsSumSalesCat WHERE PropNum = 1 AND sDate BETWEEN #07 31 2005# AND #07 31
2006# AND Category <'Z' GROUP BY sDate PIVOT Category;

I've tried inserting SortOrder as shown below, but get an error 'Syntax
Error in Transform statement'.

TRANSFORM SUM(qsSumSalesCat.[SalesRate]) AS [SalesRate] SELECT sDate,
SortOrder FROM qsSumSalesCat WHERE PropNum = 1 AND sDate BETWEEN #07 31
2005# AND #07 31 2006# AND Category <'Z' ORDER BY SortOrder GROUP BY
sDate PIVOT Category;

Any help appreciated.
--
Bob Darlington
Brisbane

Aug 25 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.