Take the right URL when generating legend and chart for reports