• Consider packaging your SQL queries in stored procedures, and not imbed the query in the report. (There are about as many people who would fight to the death to support this viewpoint as there are who would fight to the death supporting imbedding SQL in the report.)

    If you do package the SQL in a stored procedure, you can test the SQL completely independently of the report. I have often found with complex reports that have imbedded SQL, it can be difficult to troubleshoot if the problem is in the SQL or the report definition.

    You can get the SQL that is used for the report out of Cognos.

    Original author: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.

    When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara