Fix for Bug NMS-6632

Can't download generated reports, a NPE is thrown by the WebUI.

The fix for NMS-6580 must be executed if and only if the fileName
parameter exist and is not null, otherwise, the controller must proceed
to analyze the locatorId to find the physical location of the report.
[bamboo] Automated branch merge (from 1.10:8d3bc27a18692f75639827c76e940ac098e6b5f1)