Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sort subtotal in dynamic crosstab query report

Status
Not open for further replies.

gc

MIS
Mar 8, 2001
68
US
I have a report based on dynamic crosstab query. the last column is the subtotal. I want the report sorted by the value of the subtotal column, but I don't know how.
Please help and thanks a lot in advance!
George
 
Go into the report, right click and select Sorting and Grouping. Put your subtotal field first and then select ascending or descending order.

HTH Joe Miller
joe.miller@flotech.net
 
Hi! Joe
Thank you for your response. I use Microsoft Solution sample to create this dynamic crosstab query report and I can't find the subtotal column field in Grouping and Sorting of the report design veiw. May need some changes in the code, but I have no clue.
Any idea is great appreciated.
Thanks again!
George
 
Did you make a subtotal field on your report as an unbound control? If so you won't be able to sort on that, you'll have to get the subtotal from a query and sort off of that.

Joe Miller
joe.miller@flotech.net
 
Hi! Joe:
I created a subtotal field in the query, but crosstab query doesn't allow to sort by this aggregated field. So I create a new table based on this query. In the report now I can sort by the subtotal, but the detail columns still keep their order. (I still use unbound control for them.)
Any ideas?
Thanks a lot!
George
 
Hi! Joe:
I solved the problem. When make the table, the records should be sorted by subtotal.
Thanks again!
George
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top