Hi,
Try this way. Replace table and field with your UDT table and field
Select [F] as Docentry,[C] as Cardcode, [y] as Year, [1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12]
from(
SELECT t0.docentry as E, t0.docentry as F, T0.[CardCode] as C,month(T0.[DocDate]) as month,year(T0.[DocDate]) as Y FROM ORDR T0 WHERE T0.[CardCode] between [%0] and [%1] ) S
Pivot
(count(E) for month in ([1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12])) P
Thanks & Regards,
Nagarajan