Sayyiduna Ali bin Abi Talib (may Allah be pleased with him) said that the Prophet (peace and blessings be upon him) went out with a funeral and saw some women sitting, so he said: "Who has made you sit here?" They said: The funeral. He (peace and blessings be upon him) said: "Will you carry it along with them as they carry it?" They said: No. He (peace and blessings be upon him) said: "Will you bury it along with them as they bury it?" They said: No. He (peace and blessings be upon him) said: "Will you wash (the deceased) along with those who wash?" They said: No. He (peace and blessings be upon him) said: "Then go back; it is forbidden for you, and you will receive no reward for it."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 7201
Isra'il said that the Messenger of Allah (peace and blessings be upon him) passed by some women and said: "What is the matter with you?" They said: We are waiting for the funeral. Then he narrated the whole hadith, except that he said: "Will you throw soil along with those who throw soil?" They said: No. And he did not mention the washing.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 7202
Sayyiduna Abdullah bin Amr (may Allah be pleased with them both) narrates from the Messenger of Allah (peace and blessings be upon him) that he (peace and blessings be upon him) saw his daughter Sayyidah Fatimah (may Allah be pleased with her) and asked: "Where have you come from?" She said: From behind this funeral. He (peace and blessings be upon him) said: "Did you reach the graveyard with them?" She said: No; how could I reach it when I have heard (about this) from you (peace and blessings be upon him)? He (peace and blessings be upon him) said: "By the One in whose Hand is my soul! Had you gone with them, you would not have seen Paradise until your father's grandfather sees it."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 7203