2 complicating factors: Our fiscal year runs from Oct 1 - Sep 30 I need to have this report run this year next year and 5 years from now without having to change the program. ie the titles must be variable.
The data comes from an invoice table with field names as follows: customer (customer name) document_date (the date of the invoice) amount (the invoice amount)
I have achieved some success by adding 3 months to the document_date to get a field with the correct fiscal year, But my crosstab attempts have all failed.
if you want to do this with t-sql AND your column names will change depending on the daterange then you will need to implement a "dynamic cross tagb" or "dynamic pivot". Search this site for lots of examples.
>>But my crosstab attempts have all failed If you need customized help then post your attempt(s)