Author Topic: Report generating "xml parse" error at 32768 records  (Read 478 times)

ronrosell

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 10
    • View Profile
Report generating "xml parse" error at 32768 records
« on: March 29, 2022, 07:18:14 pm »
Hi Paramvir,

Wrestling with another weird issue. I have two reports on our system, one of which is humming along fine generating reports containing over 100,000 records ... while the other one generates a parsing error at precisely 32,768 records (the limit of an integer).

Here's the error message:
error on line 25 at column 262: xmlParseEntityRef: no name
error on line 25 at column 262: Encoding error

Line 25 is the line that contains our data, which is in a JSON array: [["value","value"...],["value",value"...]] and so on. We're not using objects/labels for this data, just arrays. That's true of both tables ... the one that works, and the one that doesn't.

I'm using the exact same Object definition in the two models. The Column definition is a bit different, but only because the report that's giving me problems has much less data per record ... 9 columns, versus 20.  Moreover, if there were a problem with the column definition I don't think it would be giving me 32767 records without problems.

We're not trying to do any column totals, rendered cells using calculations, or anything like that. Just a table of data, mostly strings, a few dates and a couple of integer values.  This is true of both tables.

I've tried several sets of data, thinking it might be a corrupted record; it always stops at the magic 32,768 integer limit. If I give it 32767 records, the table displays without problems. The problem is also not on the server side; all of the records are being assembled and appearing in the data array in the browser's source code, the browser just isn't parsing it beyond 32,767 records ... except in the "working" model which has no problem with more than 100,000 records.

Any thoughts on what I should be looking for on this? It has to have something to do with that 32,768 integer limit.

Below is the column model, followed by a sample of a couple of records of data.  Thank you!

var colModel = [{
  title: "Trainee ID",
  dataType: "string",
  maxWidth: 100,
  minWidth: 100,
  filter: {
    crules: [{
      condition: 'begin'
    }]
  }
}, {
  title: "Trainee Name",
  dataType: "string",
  maxWidth: 200,
  minWidth: 100,
  filter: {
    crules: [{
      condition: 'begin'
    }]
  }
}, {
  title: "Course ID",
  dataType: "string",
  maxWidth: 100,
  minWidth: 100,
  filter: {
    crules: [{
      condition: 'range'
    }]
  }
}, {
  title: "Course Title",
  dataType: "string",
  filter: {
    crules: [{
      condition: 'range'
    }]
  }
}, {
  title: "Status",
  dataType: "string",
  minWidth: 100,
  maxWidth: 100,
  filter: {
    crules: [{
      condition: 'range'
    }]
  }
}, {
  title: "Score",
  dataType: "integer",
  maxWidth: 70,
  minWidth: 70,
  filter: {
    crules: [{
      condition: 'between'
    }]
  }
}, {
  title: "First Date",
  dataType: "date",
  maxWidth: 100,
  minWidth: 100,
  exportRender: true,
  format: "M dd, yy",
  filter: {
    crules: [{
      condition: 'between'
    }]
  }
}, {
  title: "View Count",
  dataType: "integer",
  maxWidth: 70,
  minWidth: 70,
  filter: {
    crules: [{
      condition: 'between'
    }]
  }
}, {
  title: "Viewing Dates",
  minWidth: 300,
  menuIcon: false,
  dataType: "string"
}];

Here's a snippet of the data.  Note that the string of dates in the last field of each record (spelled out as March 26, 2022 and so on) is not meant to be parsed; those dates all appear as text in one table cell.

var reportdata = [
  ["ba2ead76-cbae-4bd1-ab24-cfb03b9e82ff", "Trainee One", "E_3389", "Lockout/Tagout Affected Employees", "COMPLETED", "90", "03/26/2022", "1", "March 26, 2022"],
  ["47063f83-ca57-4d30-95e6-dbfc95468d25", "Trainee Two", "E_3443", "Dealing With Drug & Alcohol Abuse for Managers", "COMPLETED", "90", "03/25/2022", "3", "March 25, 2022/March 25, 2022/March 25, 2022"]
]

ronrosell

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Report generating "xml parse" error at 32768 records
« Reply #1 on: March 30, 2022, 01:10:31 am »
Ack. I figured it out (feel free to delete this thread if you like).

The page is a dynamic one ... and there were a couple of stray invisible characters on it, right before the call to pqgrid to assemble the table. Removing those solved the problem. Why they didn't affect smaller datasets is unclear, but I'm declaring victory.

Sorry for the trouble!

Ron