Maximum number of bytes in report exceeded - API do_query

  • 1
  • 2
  • Question
  • Updated 6 months ago
  • Answered

Hi,

I use API to create a select query (do_query)

I get the following error message when the table contains only 7809 lines !!

Errcode : 75

Errtext : Report too large

Errdetails : Maximum number of bytes in report exceeded

Help Please


Photo of Communaute

Communaute

  • 10 Points

Posted 3 years ago

  • 1
  • 2
Photo of Keith

Keith, Champion

  • 1,192 Points 1k badge 2x thumb
It may only be 7809 records but how many fields are being returned?  Try to limit the fields being returned by the query.  Include a clist parameter and just add fields ids you need to bring back in the query.

ie.

clist=3.4.5.6.7
Photo of Communaute

Communaute

  • 10 Points
Thank you for your reply
I select 60 columns, but I need them all
Photo of Nathan Crum

Nathan Crum

  • 72 Points

I just ran into this problem as well with a report that only has 4 fields but over 120K records. If you are using the API to download it you can create a loop that keeps track of how many records you are downloading at a time and use API_DoQueryCount as well as the API_DoQuery options "num-n.skip-n" to paginate your way through the records like this sudo code below:

maxRecords = {API_DoQueryCount}
retrievedRecords = 0
recordChunk = 1000
myCSV = path\to\csv
tempRecords = ""
while (retrievedRecords < maxRecords) tempRecords = API_DoQuery&query="yourQuery"&options=num-{recordChunk}.skip-{retrievedRecords}     myCSV += tempRecords     retrievedRecords += 1000

While the example above is over simplified and leaves out any conversion process of changing the XML into CSV I think it gives you a starting idea of how it can be done.