Fix download
Merge pull request #1195 from nlegoff/fix-download-report

[3.8.6] Fix report sql queries for downloads