Export to PDF error: startIndex cannot be larger than length of string

  • Hi has anyone come across this before? General question for now so not including rdl yet.

    We have a report that has been in production without error or change for about 3 years, users always export to pdf to send to clients.

    There is only one parameter in the report, populated from a simple query. When one particular option is used the report runs perfectly but when trying to export to pdf we get this error:

    startIndex cannot be larger than length of string.

    Parameter name: startIndex

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: Microsoft.Reporting.WebForms.ReportServerException: startIndex cannot be larger than length of string.

    Parameter name: startIndex

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [ReportServerException: startIndex cannot be larger than length of string.

    Parameter name: startIndex]

    [ReportServerException: An error occurred during rendering of the report.]

    [ReportServerException: An error occurred during rendering of the report. (rrRenderingError)]

    Microsoft.Reporting.WebForms.ServerReport.ServerUrlRequest(Boolean isAbortable, String url, Stream outputStream, String& mimeType, String& fileNameExtension) +1034

    Microsoft.Reporting.WebForms.ServerReport.InternalRender(Boolean isAbortable, String format, String deviceInfo, NameValueCollection urlAccessParameters, Stream reportStream, String& mimeType, String& fileNameExtension) +1329

    Microsoft.Reporting.WebForms.ServerModeSession.RenderReport(String format, Boolean allowInternalRenderers, String deviceInfo, NameValueCollection additionalParams, Boolean cacheSecondaryStreamsForHtml, String& mimeType, String& fileExtension) +209

    Microsoft.Reporting.WebForms.ExportOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +219

    Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +171

    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +599

    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171

    It will export to Word and Excel fine and if any other option from the list in the parameter is chosen then export to PDF works without error.

    The only thing I can find that comes close after an extensive search is this and was someone exporting to Excel. MS suggests it was a bug in 2005 that should be fixed in 2008.

    Any pointers gratefully received.

    "Knowledge is of two kinds. We know a subject ourselves, or we know where we can find information upon it. When we enquire into any subject, the first thing we have to do is to know what books have treated of it. This leads us to look at catalogues, and at the backs of books in libraries."
    — Samuel Johnson
    I wonder, would the great Samuel Johnson have replaced that with "GIYF" now?

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply