Not sure why this is suddenly happening as my recent changes don't alter the report significantly - if anything they might reduce the number of pages.
Code:
Dim renderCheck As DocumentRenderer
renderCheck = New DocumentRenderer(_doc)
Dim pages As Integer
renderCheck.PrepareDocument()
pages = renderCheck.FormattedDocument.PageCount
When trying to calculate number of pages it errors on renderCheck.PrepareDocument() with this error:
Quote:
Specified argument was out of the range of valid values.
Parameter name: index
What went wrong or more specifically, why would I get this error?
NB: I have tried using different input data - sometimes it works, sometimes it doesn't.