TheresAlwaysAWay
Programmer
I've been asked to create a report that displays the performance of a group of customers over the last 12 months, broken down by month so trends are visible.
The first immediate problem I face is how to create the query's output field names. I want 13 columns in the result. The first column's name would be the CustomerName, and then assuming it's now Sept of 2018, I'd like the remaining column names to be:
Oct 2017, Nov 2017, Dec 2017, Jan 2018...Sep 2018
I don't think I'll have much problem separating the data into the appropriate groups and generating the numbers we wish to see (if I do I can always start another thread), but I'm puzzling over whether it's possible to use an expression to create the output field name. Obviously next month the first field should be Nov 2017 and the last Oct 2018. I'm trying to generate these names on the fly each time the query is run based on today's date. I know how to create aliases in their normal fixed usage, of course, but this would require a variable that could be evaluated and that would change from month to month.
Does anyone have any creative solutions?
As always, all assistance is greatly appreciated.
The first immediate problem I face is how to create the query's output field names. I want 13 columns in the result. The first column's name would be the CustomerName, and then assuming it's now Sept of 2018, I'd like the remaining column names to be:
Oct 2017, Nov 2017, Dec 2017, Jan 2018...Sep 2018
I don't think I'll have much problem separating the data into the appropriate groups and generating the numbers we wish to see (if I do I can always start another thread), but I'm puzzling over whether it's possible to use an expression to create the output field name. Obviously next month the first field should be Nov 2017 and the last Oct 2018. I'm trying to generate these names on the fly each time the query is run based on today's date. I know how to create aliases in their normal fixed usage, of course, but this would require a variable that could be evaluated and that would change from month to month.
Does anyone have any creative solutions?
As always, all assistance is greatly appreciated.