Sadaqah Jariyah for the Deceased
Question

My father died – may Allah have mercy on him – and I want to give ongoing charity on behalf of his soul so as to increase his good deeds and raise him in status before his Lord, such as building a mosque or printing a book by which the Muslims will benefit. But one of the shaykhs gave us a fatwa stating that this will not benefit him because it is not from his wealth, and ongoing charity has to be set up by the person himself during his own lifetime before his death, and has to continue after his death. Is what the Shaykh said correct? 

If it is not correct, then please advise me and tell me the best way to benefit my deceased father. May Allah reward you with good.
Praise be to Allah.What benefits the dead?
The scholars are agreed that the benefits of du`a , praying for forgiveness, giving charity and Hajj reach the deceased. 
With regard to du`a and praying for forgiveness, Allah says (interpretation of the meaning): 
“And those who came after them say: ‘Our Lord! Forgive us and our brethren who have preceded us in Faith’” [al-Hashr 59:10]
The Prophet (peace and blessings of Allah be upon him) said: “Pray for forgiveness for your brother and ask that he be made steadfast, for now he is being questioned.” 
And he (peace and blessings of Allah be upon him) said: “When you offer the (funeral) prayer for the deceased, then make du`a sincerely for him.”  
With regard to charity, it was narrated in al-Sahihayn from `Aishah that a man said to the Prophet (peace and blessings of Allah be upon him): “My mother died suddenly and she did not leave a will, but I think that if she could have spoken she would have given in charity. Will she have a reward if I give in charity on her behalf?” The Prophet (peace and blessings of Allah be upon him) said: “Yes.” (Narrated by al-Bukhari, no. 1388; Muslim, no. 1004)  
And it was narrated by al-Bukhari from Sa’d ibn 'Ubadah that his mother died when he was absent, and he said: “O Messenger of Allah, my mother has died when I was absent. Will it benefit her if I give in charity on her behalf?” He said: “Yes.” He said: “I ask you to bear witness that my garden that bears fruit is given in charity on her behalf.” (Narrated by al-Bukhari, 2756) 
With regard to Hajj , the Prophet (peace and blessings of Allah be upon him) said to one who asked him about Hajj: “Don’t you think that if your mother had a debt, you would pay it off for her?” She said: “Yes.” He said:  “A debt owed to Allah is more deserving of being paid off.” (Narrated by al-Bukhari, 6699; Muslim, 1148) 
Sadaqah Jariyah for the Deceased
From the above you will know that giving charity on behalf of the deceased will benefit him and its reward will reach him. 
There is a weak hadith about offering prayer on behalf of the dead. Imam Muslim mentioned in his introduction to his Sahih that ‘Abd-Allah ibn al-Mubarak regarded this hadith as weak, then he said: 
“There is no difference of opinion concerning giving charity (i.e., on behalf of the dead).”
Al-Nawawi said: 
“His words “There is no difference of opinion concerning giving charity (i.e., on behalf of the dead)” means that this hadith is not to be taken as evidence. But whoever wants to honour his parents, let him give charity on their behalf, for (the reward of) charity will reach the deceased and benefit them, and there is no difference of opinion among the Muslims concerning this point. This is the correct view. 
With regard to the report narrated by the judge Abu’l-Hasan al-Mawardi al-Basri al-Faqih al-Shaf’i in his book al-Hawi from some of the scholars of al-kalam, that no reward can reach the deceased after his death, this is a view that is definitely wrong and is clearly contrary to the texts of the Quran and Sunnah and the consensus of the ummah, so no attention should be paid to it. With regard to praying and fasting on behalf of the dead, the view of al-Shafi’i and the majority of the scholars is that the reward for that does not reach the deceased, unless it is a fast that was obligatory for the deceased, so his heir or someone to whom the heir gives permission makes it up on his behalf. Two views concerning this were narrated from al-Shafi’i, the better known of which is that it is not valid; the more correct view according to the later Shafi'i scholars is that it is valid. 
With regard to reading the Quran, the well-known view of the Shafi'i madhhab is that the reward for that does not reach the deceased. Some of his companions said that its reward does reach the deceased. Some of the scholars were of the view that the reward of all acts of worship – prayer, fasting, reading Quran, etc – reaches the deceased… Then al-Nawawi mentioned that the reward for du`a, charity and Hajj reaches the deceased, according to scholarly consensus.” 
It says in Tuhfat al-Muhtaj (7/72): 
“The deceased can benefit from charity given on his behalf, which includes a waqf of a Mus-haf etc, or digging a well, or planting a tree, whether he does that during his lifetime or it is done by someone else on his behalf after his death. 
How to benefit your dead father
With regard to the best ways of benefiting your father, you should make a lot of du`a for him. Allah says (interpretation of the meaning): 
“and say: ‘My Lord! Bestow on them Your Mercy as they did bring me up when I was young’” [al-Isra 17:24]
And the Prophet (peace and blessings of Allah be upon him) said: “When a person dies, all his good deeds come to an end except three: ongoing charity , or beneficial knowledge, or a righteous child who will pray for him.”  
With regard to charity , the best things on which charity may be spent are jihad for the sake of Allah, building mosques, and helping seekers of knowledge by printing books for them or giving them money that they need. 
And Allah knows best.