Query Report vs Script Report

From my understanding the only difference between Query Reports and Script Reports is that one uses SQL and the other uses Python.

Is there any significant difference between the two? Or is the only difference which one the administrator is more familiar with using to make the reports? Suppose you are familiar enough with SQL to do different kinds of joins between the tables and row functions, is there a reason why one should prefer doing Script Reports instead?

Are there any performance differences between Query Reports and Script Reports? Like if the query becomes too complex, it becomes advisable to do Script Reports instead? Is there a speed difference between the 2 reports?

Thank you

Main difference between Query Reports and Script Reports is the language they use: Query Reports rely on SQL, while Script Reports are written in Python. Both can be used to create custom reports, but the choice often depends on the complexity of the report and what the administrator or developer is more comfortable with.

While Query Reports are good if you’re familiar with SQL and can handle joins, filters, and other functions, they do have limitations. For example, you can’t use dynamic filters easily. If you add a filter, you have to manually enter a value for it, and the report won’t work until the filter value is provided. This can make Query Reports harder to manage when you need more flexible or dynamic filtering options. Handling complex logic or calculations can also become tricky in Query Reports.

On the other hand, Script Reports give you more flexibility with Python. You can add dynamic filters and handle more complex business logic or calculations that might be difficult to achieve using SQL alone. Though Script Reports may be slower than Query Reports because they run Python code after fetching the data, they offer better control when dealing with complex reports.

In terms of performance, Query Reports are usually faster since they run directly on the database. However, if the query gets too complex, it can slow down the report, and it may be better to use a Script Report for advanced data handling.

2 Likes

Thank you sir, this has been very informative.