Error ''Too Many Records'' received when trying to preview or generate a report

Symptom

The error, “Too Many Records” displays when you are trying to preview or generate a report.  This error occurs when a report contains more than the set maximum allowed number of records. This can also occur while building the report if it contains more than the set number of records.   

Resolution

Change the maximum number of allowed records per workstation that are pulled for a report:

1.     Open the ACS.INI file.

2.     Locate the [Performance] section.

3.     In the [Performance] section, add a configuration line where ## is the desired maximum number of records pulled into a report.

ReportMaxRecordCount = ## 

Note:  If your ACS.INI file does not contain a [Performance] section, create one by adding [Performance] outside of another section.  This change would be required on every machine running reports.

4.     If the error continues, locate the [Database] section.

5.     Add the following line to the [Database] section of the ACS.INI file.  

ReportDebug=1

Turn off by changing it to 0 when finished debugging.

6.     Generate the report. 

7.     Open the ReportSQLDebug.txt file. This file should be located c:\users\\AppData\Local\Temp\Reports depending on the OS version of the workstation. 

8.     Copy and paste the sql query inside the text file to the SQL Management Studio.

9.     Change it to:

SELECT COUNT (*) FROM 

This will get the records count.

10. Open the ReportSQLDebug.txt file and copy the sql query. 

11. In SQL Management Studio create a new query in AccessControl and paste in the copied query. 

12. Remove the line between the Select and From sections.

13. Change the Select line to include 

SELECT COUNT (*)

14. Execute the query and check the time needed to complete the query.

15. Add the following line to the [Database] section of the ACS.INI file. 

Timeout=X 

X will be the number of seconds it took to complete the query plus a couple of seconds needed to transfer between client and server.

Example:

[DataBase]

Timeout=X (the number is in seconds)

Applies To

OnGuard (All Versions)

Additional Information


The “ReportMaxRecordCount” value is 200000 by default.
Increasing the ReportMaxRecordCount to very high value can cause an out of memory exception, especially for reports with images.
Increasing the Timeout value means slow system response to broken database connection.