Hi,
I don't think we can hide columns dynamically. If you keep your KF under Calmonth, then if the data exists for all 12 months, then you will get 12 columns automatically.
If you want to show fixed columns irrespective of data availability, then you have to create multiple KFs with Offfset values.
Another option is, you may try with customer exit.
You can think of creating your required number of Kfs and hide the unwanted KFs by using (Hide can be shown) option in query. If the user wants, you can display on the fly.
Whatever you take, i do not see that we can generate columns dynamically.
Regards,
Suman