SQL Server Developer Center > SQL Server Forums > SQL Server Reporting Services > Error in Report Manager - "Unexpected end of file has occurred. The following elements are not closed: html."

Answered Error in Report Manager - "Unexpected end of file has occurred. The following elements are not closed: html."

  • Wednesday, July 23, 2008 9:34 PM
     
     
    Hey everybody. First post on these forums. Be nice to me Smile.

    So I'm pretty new to SSRS. I've created smaller reports here and there with no problem. Recently however, I created a pretty big report that returns thousands of records, which I'm sure is still no big deal compared to some of you.

    When I render the report within Visual Studio - where it was created - it runs just fine. Whenever I deploy it to Report Manager and then try to run it, it conks out after about 7 minutes of generating and gives me this error:
    • Unexpected end of file has occurred. The following elements are not closed: html. Line 28, position 9.
    It's really weird, as I can't imagine how it would generate perfectly fine in it's development environment, but not run at all when it is deployed? Everywhere I looked people claim it's an XML error, but SSRS wrote the XML, so shouldn't it be syntactically correct?

    Any ideas...?

Answers

  • Monday, September 08, 2008 8:37 PM
     
     Answered

    I did, actually.

     

    1) First thing I had to do was turn on remote errors, as shown in this link -

     

    http://msdn.microsoft.com/en-us/library/aa337165(SQL.90).aspx

     

    2) Once I did this, I recieved a completly different error when trying to run the reports -

     

    '/' is an unexpected token. The expected token is '='. Line 9, position 33.

     

    3) To fix this, I went into the report servers Web Config file, located at the following location -

     

    C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer

     

    4) I then noticed that the executionTimeout element was set for 90 seconds, so I merely increased this number.

     

    The reports have been working perfect ever since, so I can only assume that it was some kind of timeout error all this time. Hopefully if you're experiencing the same errors with the Report Server, this can fix your problems as well.

     

    Good luck!

All Replies

  • Thursday, July 24, 2008 2:23 AM
    Answerer
     
     

    Hi Paul - Welcome, I've not been around for a while myself.

     

    The error you are getting could be because the report execution is returning an error that is too large and getting truncated. SOAP responses have a 64k limit by default, but if you have access to the server, you can override this by changing the MaximumErrorResponseLength. Here is a link that provides more details of the setting.

     

    http://msdn.microsoft.com/en-us/library/65ha8tzh.aspx

     

    I hope this helps.

     

    Thanks, Dean

     

    This posting is provided "AS IS" with no warranties, and confers no rights.

     

  • Thursday, July 24, 2008 10:20 PM
     
     

    Hey Dean! Thanks for the response.

     

    I tried to follow your directions involving the MaximumErrorResponseLength configuration, but am unsure if I went about it correctly. After reviewing the link you provided, I gathered that this could be accomplished by altering the ‘machine.config’ file located in C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG. Is this correct?

     

    When I opened up the file with notepad, I noticed that there was a setting for the ‘MaximumResponseLength’ attribute, but not for the other attributes that were listed in the link that you had provided. Not knowing if this was the proper file to be altering, I simply added the other attributes in their appropriate places and gave them a value of “-1” for testing purposes to see if the report could then fully generate within Report Manager.

    Still, the reports still seem to give me the same error. I uploaded the same reports to another clients Report Server to test the report against their system, and receive a different error:

     

    '/' is an unexpected token. The expected token is '='. Line 9, position 33.

     

    I’m really confused…any suggestions or ideas? I wonder if I’m even configuring the proper file…

  • Thursday, July 24, 2008 11:11 PM
    Answerer
     
     

    Hi Paul - Yes, this is the correct file. You should not need to change the other settings as they should use the defaults. Looking at the error "line 9 position 33" doesn't sound like it should exceed 64k unless they are very long lines. At this point we will probably need to try and repro do some low level debugging of the issue here. Is there any chance we could get you to file a bug via http://connect.microsoft.com and attach the report definition for us to look at?

    Thanks, Dean

     

    This posting is provided "AS IS" with no warranties, and confers no rights.

  • Wednesday, July 30, 2008 10:02 PM
     
     
    Hey there again, Dean.

    Sorry for the late reply. I'm just letting you know that I have submitted a bug report to the link you provided, along with an attachment of the reports .rdl file. Thanks for all the help and time you've given so far - I really appreciate it.

    ---

    Also, a little update on my report situation -

    I enabled remote errors through the guide I found at this link -
    http://msdn.microsoft.com/en-us/library/aa337165.aspx, hoping that I could better diagnose the error that was being passed. Now, when I try to generate the report, I get two different errors depending on where I try to run the report from:

    When run through http://localhost/ReportServer, the error reads

    "Internal Error on Report Server (rsInternalError). Request Timed Out."



    When run through http://localhost/Reports, the error reads

    "The Remote Server returned an error: (500) Internal Server Error."

    I don't know if this helps better pin-point the problem, but I thought I should just let you know in case anybody might have an idea of what's going on...

    Thanks!
  • Monday, September 08, 2008 8:09 PM
     
     

    Hi Paul:

     

    Did you get a resolution or find a workaround?

     

    Thanks,

    Vidya.

  • Monday, September 08, 2008 8:37 PM
     
     Answered

    I did, actually.

     

    1) First thing I had to do was turn on remote errors, as shown in this link -

     

    http://msdn.microsoft.com/en-us/library/aa337165(SQL.90).aspx

     

    2) Once I did this, I recieved a completly different error when trying to run the reports -

     

    '/' is an unexpected token. The expected token is '='. Line 9, position 33.

     

    3) To fix this, I went into the report servers Web Config file, located at the following location -

     

    C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer

     

    4) I then noticed that the executionTimeout element was set for 90 seconds, so I merely increased this number.

     

    The reports have been working perfect ever since, so I can only assume that it was some kind of timeout error all this time. Hopefully if you're experiencing the same errors with the Report Server, this can fix your problems as well.

     

    Good luck!

  • Monday, September 08, 2008 10:11 PM
     
     

    Paul:

     

    Thanks a ton.  That most definitely worked Smile

     

    Vidya.