Is it possible to use values of data from a table as column headers? Here is what I would like to do if I use SQL to create this report. My table has data associated with a term term in each record. For example if the data exists when school term = '14FA' then I want the value (Or a flag) from the desired field in the record to appear in the column that would be dynamically labeled '14FA'. As I said I want the column headers to be dynamic. So when I run the report this year it might have column headers '14FA', '14SU', '14SP', '13FA', etc. There may be 10 or more different terms I want to report on, and I only want the term column to appear if the data I am looking for is found. Then next year when the report is run, it might contain dynamic column headers such as '15FA', '15SU', '15SP', '14FA', '14SU', etc.
I was thinking about first creating a temp table related to the terms that contain the data I want, hoping I could use it to define the columns I would have in the report. But I do not know how to convert, if possible, the term value to a column header.
Is this possible without hard-coding the terms as the column headers?
I was thinking about first creating a temp table related to the terms that contain the data I want, hoping I could use it to define the columns I would have in the report. But I do not know how to convert, if possible, the term value to a column header.
Is this possible without hard-coding the terms as the column headers?