You need to start by looking at what you have in #Date - your code fills #Date11:
SELECT DISTINCT EntryDate INTO #Date11
FROM Probale
ORDER BY EntryDate
But your COALESCE command uses #Date which you don't show:
SELECT @cols = COALESCE(@cols + ',[' + CONVERT(varchar, DATEPART(DAY, EntryDate), 112)
+ ']','[' + CONVERT(varchar,DATEPART(DAY, EntryDate), 112) + ']')
FROM #Date
ORDER BY EntryDate
If you meant #Date11 in that, that would explain why
Cols
is empty.