I tried everything mentioned above. Luckily I solved the problem with a Dell dock. It seems as though the HDMI of the Dell laptop is not working properly! The connection is is now done by USB-C. Thanks once again. I hope my answer let others to solve a problem like mine. The monitor is working properly 
I am facing troubles to get the monitor Dell U2417H connected to the Laptop Dell since three days ago. The monitor displays a message saying No HDMI/MHL Cable. I changed the HDMI cable but it did not work and I also tried with a D-Port and it did not work either. I tried to set the auto mode but I can not. Can you give me any additional ideas to solve this problem? Thanks. Regards
U2417H, not connecting to Latitude 5420