• Thanks for your answers so far.

    As regards my front end, I have to use the reporting facilities of CRM (2011). I doubt its front end reporting is capable of extracting the contents of rows to transpose these into columns. So I thought of generating the data as I wanted it to be printed (Yes, I know SQL's mission is NOT presentation/formatting although this can be done not very effectively).

    Jeff:

    I was actually hoping you would look at this. " I have already done the hard part" Hah ! For me this was the easy part !

    I just started on the information at the url you provided me. Holy cow, I already handled steps 1 to 6 on my own the same way you came up with. And yes, the first rows with null fk were the original data. The non null fx rows were generated from the source and I did not really see a point in using a detail table - Maybe there is ?

    I still have to read past that, but my difficulty that since the data is based on a date range sent as parameters and I want the "transposed" column names to be each MonthYears belonging to the date range, I just could not know in advance - when coding the stored proc - what these names would be. And a few examples provided by Microsoft called for specifically knowing the column names.

    By the way, I started out with a stored proc because I wanted to print intermediate results for debuggin. This is why I did not use a table-value function.

    I' ll get back to report on whether or not I succeeded or for additional information request.

    Thank you all.