Check Cross Tab Foundation Class in help. It's made for creating reports, but I guess you also can use it to create the table you want.
>I have a table with values
>
>empno year amt
>A 2004 45.23
>A 2005 54.56
>A 2006 89.56
>B 2004 44.33
>B 2005 22.15
>B 2006 48.98
>C 2004 55.00
>C 2005 56.13
>C 2006 44.56
>
>
>How can I have a table that will appear like this
>empno 2004 2005 2006
>A 45.23 54.56 89.56
>B 44.33 22.15 48.98
>C 55.00 56.13 44.56