Sunan an-Nasa'i #1971
The Book of Funerals 21:155
It was narrated from Abu Hurairah:
That the Prophet announced the death of An-Najashi to the people on the day that he died, then he took them out to the prayer place and put them in rows and offered the funeral prayer for him, saying the Takbir four times.