Script Reports, output is limited to 160

Hello,

I have a custom report of the Script Report type.

Despite the explicit LIMIT 2000 mentioned in the query in the Python file, the result is always limited to 160 rows; even with filters, filtered data will be up to 160 rows.
How can I change this limit?

share the code

I changed the JOIN clauses to LEFT JOIN in the SQL query. This adjustment ensures that all records from the main table are included, even if there are no corresponding records in the linked tables. After this change, the report returned the expected number of rows.