Get report data from database

I recently updated to the latest source version. When I pull down my recent scan report in csv format and open in excel it’s creating line breaks where it didn’t used to.

I was wondering where I could find the query that is used to pull the information from the database so I could try pulling it directly from the database instead of downloading to csv then convert to excel.