Can you designate the sort-order for a cross tab query based on a field you don't want displayed in the query? The values of the column headings will vary each time, so I don't think setting the column-headings property will work.
Basically, I have a base query that selects:
- Customer ID (from customer table)
- Product ID (numeric from product table - preferred sort order)
- Product Name (from product table)
- Units Sold (from sales table)
The query prompts for the specified Customer ID.
I want my crosstab to look like this:
Oranges Bananas Apples
Customer A 5 10 3
The crosstab sorts the column alphabetically. I'd prefer the columns in Product_ID order. Also, not every customer buys every product, and only the relevant products should appear. If I set the column-headings properties as "Oranges", "Bananas", "Apples", all products appear regardless of activity. If I add Product_ID to the crosstab as "Not Shown", ascending order, then it groups based on the Product_ID value and I end up with multiple rows for the single customer.
Any suggestions?
Basically, I have a base query that selects:
- Customer ID (from customer table)
- Product ID (numeric from product table - preferred sort order)
- Product Name (from product table)
- Units Sold (from sales table)
The query prompts for the specified Customer ID.
I want my crosstab to look like this:
Oranges Bananas Apples
Customer A 5 10 3
The crosstab sorts the column alphabetically. I'd prefer the columns in Product_ID order. Also, not every customer buys every product, and only the relevant products should appear. If I set the column-headings properties as "Oranges", "Bananas", "Apples", all products appear regardless of activity. If I add Product_ID to the crosstab as "Not Shown", ascending order, then it groups based on the Product_ID value and I end up with multiple rows for the single customer.
Any suggestions?