17

I have a page on my 3.5 framework webforms site that displays reports. It is using report viewer 10.0.0.0. The reports render for every browser but IE11. Only reports that display information in doc type format render as an html table and are stored in a .rdl file. The param box loads but when the report is selected and ran I just get the loading gif and it times out. I've tried to troubleshoot with the IE11 dev tools and they time out upon opening it's a perfect storm here. Another bit of info I run the website locally in VS2012 and in IE11 it renders just not on the IIS7 server.

I've tried a custom .browser file to emulate IE10 no luck there. Any help will be appriciated or maybe just knowing I'm not the only one.

Update: I found the exception on my server logs. HttpHandlerInputException, Missing URL parameter: IterationId.

Thanks in advance.

vikingben
  • 1,632
  • 2
  • 24
  • 37
  • 1
    Are you sure the rdl was copied to the target? Missing a parameter sounds like a mismatch between client and server. – StingyJack Feb 24 '14 at 22:49
  • 1
    Its also possible that your URL is getting changed, did you see this link? http://stackoverflow.com/q/705359/16391 – StingyJack Feb 24 '14 at 22:49
  • Yup StingyJack after I checks the server logs and found that bit the resolution came pretty quick. Thanks for the help. – vikingben Feb 24 '14 at 22:50
  • possible duplicate of [Reportviewer showing images below Line object Just on Chrome](http://stackoverflow.com/questions/13498696/reportviewer-showing-images-below-line-object-just-on-chrome) – KyleMit Dec 01 '14 at 16:56
  • @KyleMit is right I think, in a sense: Chrome has different (much less severe) symptoms, but it's the same root cause. – Jeroen Feb 27 '15 at 14:03

6 Answers6

17

Found it on the url listed in the comments. I can't believe how lame this is that when microsoft puts out a new browser they do not test as we do.

void Application_BeginRequest(object sender, EventArgs e)
{
    // Bug fix for MS SSRS Blank.gif 500 server error missing parameter IterationId
    // https://connect.microsoft.com/VisualStudio/feedback/details/556989/
    if (HttpContext.Current.Request.Url.PathAndQuery.StartsWith("/Reserved.ReportViewerWebControl.axd") &&
     !String.IsNullOrEmpty(HttpContext.Current.Request.QueryString["ResourceStreamID"]) &&
        HttpContext.Current.Request.QueryString["ResourceStreamID"].ToLower().Equals("blank.gif"))
    {
        Context.RewritePath(String.Concat(HttpContext.Current.Request.Url.PathAndQuery, "&IterationId=0"));
    }
}
vikingben
  • 1,632
  • 2
  • 24
  • 37
  • 1
    Thank you for this crucial bit of info! I couldn't touch my global.asax, so I [ended up doing the same thing with web.config rewrite rules](http://stackoverflow.com/a/28766857/419956). – Jeroen Feb 27 '15 at 14:01
  • While this may be good enough for most SSRS reports, I'm going to wager that sometimes IterationId is set to other values in order to generate images of increasing width to create a visual identation appropriate for whatever level of depth the report-rendering logic is currently "iterating" through – bkwdesign Mar 23 '15 at 16:35
  • 1
    The MS Connect link seems to have been discontinued. Does Microsoft now have a different recommendation for how to deal with this? – sq33G May 03 '15 at 09:30
  • @sq33G Good catch the link is no longer working in the comments. I couldn't find another Microsoft article on this issue. Hopefully someone else will and add it to the thread. – vikingben May 12 '15 at 15:00
  • 1
    Thank you thank you thank you! I finally found your question and answer after being stuck on the same problem for weeks. I implemented Jeroen's solution as it was easier for me to do at the moment. Would you please reference your answer at my question, http://stackoverflow.com/q/33419047/2615836? I would love to give you an extra +1 for your answer. – Codes with Hammer Nov 24 '15 at 15:16
  • @CodeswithHammer I'm glad it helped you out. I added a link to this thread in at your post just to save people time looking around. Cheers – vikingben Nov 24 '15 at 18:10
5

I had a problem with ReportViewer 10 and IE11 too.

Upgrading to ReportViewer 11 (Sql Server 2012) solved my problem.

  • Download and install MICROSOFT® REPORT VIEWER 2012 RUNTIME: http://www.microsoft.com/en-us/download/confirmation.aspx?id=35747

  • Go to GAC folder: C:\Windows\assembly\gac_msil

  • Find the Microsoft.ReportViewer dlls just installed.

  • Copy Microsoft.ReportViewer.Common.dll and Microsoft.ReportViewer.webForms.dll to a local web folder.

  • In your solution references, remove all old references to old ReportViewer version, delete references in web.config and other files, and remove control from ToolBox.

  • Add the new (common and webforms) dll references.

  • Set their properties to Copy Local (copy to bin folder).

  • Right click on Toolbox and add ReportViewer 11 control (add the Microsoft.ReportViewer.webForms.dll reference)

  • Drop the control on your page.

  • This will add the references on the web config file and page file. In assemblies:

    <add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
    <add assembly="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
    
  • You will also need to add 2 extra entries in web.config file:

Under configuration, system.web, httphandlers:

<add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

Under configuration, system.webserver, handlers:

<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

Note: This worked for me without adding anything in Application_BeginRequest method. Also, I tried with and without compatibility meta tag, and it worked in both ways.

Johann
  • 12,158
  • 11
  • 62
  • 89
live-love
  • 48,840
  • 22
  • 240
  • 204
4

The answer by @vikingben was the basis for my answer as well, but I want to offer a solution that utilizes IIS rewriting rules, for those of us who can't easily change the global.asax c.q. application's BeginRequest. Here's my rule:

<system.webServer>
  <rewrite>
    <rules>
      <rule name="ReportViewerFix" patternSyntax="ECMAScript" stopProcessing="true">
        <match url="(.*)Reserved\.ReportViewerWebControl\.axd(.*)" ignoreCase="true" />
        <action type="Redirect"
                redirectType="Temporary"
                url="{R:1}/Reserved.ReportViewerWebControl.axd?IterationId=0"
                appendQueryString="true" />
        <conditions>
          <add input="{QUERY_STRING}" pattern="ResourceStreamID=Blank.gif" />
          <add input="{QUERY_STRING}" pattern="IterationId=0" negate="true" />
         </conditions>
      </rule>
    </rules>
  </rewrite>
</system.webServer>

Here's what it does. It finds all URLs:

  1. Matching a certain regex looking for the ReportViewer axd; and also
  2. the query string contains "ResourceStreamID=Blank.gif"; and also
  3. the query string does not contain "IterationId=0".

For any matches the browser is redirected ("Temporary", but you could as well use other status codes) to:

  1. The same axd url; with
  2. Appended "IterationId=0"; and
  3. The original query strign appended as well.
Jeroen
  • 60,696
  • 40
  • 206
  • 339
  • Thank you thank you thank you! I finally found your answer after being stuck on a problem with ReportViewer for weeks. – Codes with Hammer Nov 24 '15 at 15:06
  • Would you please reference your answer at my question, http://stackoverflow.com/q/33419047/2615836? I would love to give you answer credit. – Codes with Hammer Nov 24 '15 at 15:08
  • @CodeswithHammer Not entirely sure what you mean by "reference". Do you mean that my answer here was also the answer to your other question? If so I suggest either (a) marking your own question of a duplicate of the one here, or if it's not technically a dupe then (b) self-answer your own question and remix/use my answer here in yours at your leisure and accept that answer (all that's technically needed is a link back + attribution, as I did since my answer is also a remix of another answer. But I'm not fussed, glad you found a solution to your problem.). – Jeroen Nov 24 '15 at 16:14
3

I had the same issue. The solution was to add the site to Internet Explorer's Compatibility View site list. Then the page renders without issue.

SQLMaster
  • 31
  • 1
1

Go to IE setting then compatibility view setting then add your project website in "add this website" option.

satish
  • 21
  • 1
0

I had the same issue, using IE11/SQL2012/WinServer2012. It made no difference whether I used version 10, 11, or 12 of the report viewer. I solved it by putting my vb.net code that called the report in an if statement like this:

if not IsPostBack then
    // code to call report goes here
end if

I noticed from my trace logs that the report code was sometimes getting called more than once, and I remembered seeing the postback condition used somewhere on a report viewer example and put it in. The report loaded perfectly.

t j
  • 7,026
  • 12
  • 46
  • 66
  • Stackoverflow's questions and answers follow Markdown language features. So adding 4 spaces before a line treats it as a code. – Nikhil Agrawal Dec 29 '17 at 03:46