The questioner asks: Does informing the people about what a person gives in charity or making it apparent to them deprive the person who does this of the reward (of spending in charity)? For example if every person from a particular group of people were to give a certain (known) amount in spending.
If a person manifests his charity or the sum contributed is manifested to the people, or other than it, then this does not reduce his reward; because Allaah has praised those who spend their wealth in private and public; rather sometimes it may be that spending openly is better than spending secretly if there is a benefit in making it open, such that the people follow his (i.e. the spender’s) footsteps and do what he did. This may be similar to the one who guides to good and the one who guides to good is similar to its doer. “Whoever starts a good thing in Islam, and others do likewise after him, there will be written for him a reward like that of those who followed him in that until the day of resurrection.”(1) Yes. If a person knew in his heart that by manifesting it (i.e. spending in charity) he is intending to show off to the people and to be seen, so that they can praise him for performing this act of worship; then indeed this is from Riyaa, which a person must strive to free himself as much as he can. And Allaah is the one who grants success.
Shaykh Uthaymeen: Fataawa Noor ala ad-Darb page 12-13 vol 7
 A brief clarification: “Whoever starts a good thing in Islam, and others do likewise after him, there will be written for him a reward like that of those who followed him in that until the day of resurrection.”
Jareer ibn ‘Abdullaah (radiyallaahu-anhu) said: “Some people from the Bedouin came to the Messenger of Allaah (sallal-laahu-alayhi-wasallam), wearing woollen garments. He saw that they were in bad shape and in desperate need, so he urged the people to give them charity. The people were very slow to respond, and it could be seen in his face (that he was upset). Then a man of the Ansaar brought a package, then another came, and another and another, and his face was filled with joy. The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Whoever starts a good thing in Islam, and others do likewise after him, there will be written for him a reward like that of those who followed him in that until the day of resurrection.” Whoever starts a bad thing in Islam, and others do likewise after him, there will be written for him a burden of sin like that of those who followed him, without it detracting in the least from their burden.'” [Reported by Imaam Muslim (rahimahullaah) in Book of Zakat. Hadeeth Number 1017]
“Whoever starts a good thing in Islaam;” Starts acting upon a legislated Sunnah and it does not mean the one who innovates; because the one who innovates something (i.e. an act of worship that is not legislated) in Islaam, he will have it rejected. Rather, what is intended in this hadeeth is the one who was the first person to act upon that Sunnah, just like this companion who came along with a package to give in charity. There are three ways of starting something in Islam:
So there is nothing to be considered a good Sunnah in Islaam except that which has been legislated in the Sharee-ah. So whoever revives an abandoned legislated Sunnah or leads the way to performing a legislated Sunnah, there will be written for him a reward like that of those who followed him. However, some people have taken this hadeeth an excuse to innovate in the religion of Allaah that which is not from it.
For further details, see discussions by Imaams Bin Baaz and Muhammad Ibn Saaleh Al-Uthaymeen (rahimahumallaah):