views:

2799

answers:

1

I have been having a strange problem with interactive sorting and paging within a ReportViewer that I can't figure out. I am using a local report definition and a ReportViewer control within an aspx page. I have AsynchRendering set to true. Everything seems to work fine except for this problem. Here are the steps to reproduce the problem:

(page 1 before all sorts)
COL1 | COL2
  a     1
  c     3
  b     2

1) While on page 1, sort ascending on COL1 - sort is correct

(page 1)
COL1 | COL2
  a     1
  b     2
  c     3

2) Navigate to page 2 - sort is correct

(page 2)
COL1 | COL2
  d     4
  e     5
  f     6

3) Sort descending on column X (after doing this it automatically returns to page 1) - sort is correct

(page 1)
COL1 | COL2
  z     26
  y     25
  w     24

4) Navigate to page 2 again - sort is incorrect; the data is is still sorted in ascending order as if the sort click while on page 2 never happened

(page 2)
COL1 | COL2
  d     4
  e     5
  f     6

Other strange things:

  • If i navigate to any other page except for page 2 from page 1, the sort order is correct, and if i navigate to page 2 from any other page except from page 1, the sort order is correct.
  • If i set AsyncRendering to false, i don't have this problem at all. I need AsyncRendering set to true though.
  • This problem only happens in IE6 and IE7. I doesn't happen in Firefox or Chrome.
  • Here's the weirdest one => this problem only happens after i deploy to the web server. If i run it from Visual Studio 2008 development server on my computer, everything works perfectly without exception.

This is a problem because the corp i work for pretty much only uses IE6/IE7, this sort feature is a requirement, and the page is too slow if i don't use AsyncRendering.

Any help with this would be much appreciated.

(comments from an answer i made before i had enough reputation to be able to comment): there is something else i noticed about what is happening with this. using fiddler, i watched the http request/responses on each sort click and navigation click, and i noticed that there is no http GET request when navigating from page 1 to page 2. all other navigation clicks and sort clicks make a GET request and then the html is refreshed with the corresponding response. if there is no GET request when navigating from page 1 to 2 after another sort has happened, then the page will not get refreshed to the current sort order. this seems like a ReportViewer AJAX bug to me...

A: 

I've had problem using AsyncRendering, my prblem was quite different to yours but maybe this link might help you.

Try use the recommendations made in this article, removing the xhtml doctype from the page worked for my problem.

[http://msdn.microsoft.com/en-us/library/ms252090(VS.80).aspx][1]

[1]: http://the xhtml doctype from the page

Alan FL
thanks for the reply, Alan!yea, i had read that before. i just think it's kinda goofy that you have to remove doctypes to get controls to work. they should work and our xhtml and css should validate. i haven't tried it yet, but i'll let you know what happens.
gabe
i never tested Alan's answer out, but i'm sure it's probably the solution. So i am marking this as the answer (and since no else had any better ideas).
gabe