none
Reporting Services Interactive Sort and Paging Problem RRS feed

  • Question

  • 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.

    - gabe

    Wednesday, November 19, 2008 5:16 PM

All replies

  • This really isn't an answer to your problem, but it's what I had to do for sorting in my solution.

    Interactive sort is only one column at a time, and my boss wanted to sort on up to three columns simultaneously, alternating any column ascending and descending.


    For example.    Year  Make Model.

    Year being the first sort,  Descending

    Make Being the second sort Ascending




    So you'd have stuff like

    all the 2007 cars llisted together,  then we'd start with all the all the audi,

    stuff like that


    So, in order to do this,  Interactive sort wouldn't work for me, since it's only one  column at a time to my knowledge.

    Here's what I did

    In all my .RDLC file for the datasource that is attached to the primary table of the report,  I added  six columns.

    Sort1
    Sort2
    Sort3
    Sort4
    Sort5
    Sort6

    Then in table, I set the sorting properties to sort on those six fields

    Sort1 sort2 and sort3  were set ascending

    sort4 sort5 and sort6 were set desceninig


    Then in my page, when I'd get my data from the database, I'd just attach those six columns to my datatable, and hand it in as the datasource.   Those six columns wouldn't have any values in it yet, and hence would have no effect on sorting.

    Now on my page I had three drop downs loaded with all the fields in my datatable.   If a user selects one of those fields to sort by,  I'd copy all the data from the column they selected to my Sort 1 column if they wanted to do it ascending,  and sort 4 if they wanted to do it descending.

    Then refresh the report.   now that one of those columns have data in it, it logically sorts off it.


    This might be overkill for you, but figured I'd share.

    Living my life at 123mph in 11.15 seconds
    Wednesday, November 19, 2008 9:05 PM
  • thx for the idea blast!

    i don't think that's exactly what my customer wants.  the main problem is with the AJAX functionality of the ReportViewer (AsyncRendering).  i think i've discovered a bug. 8o)

    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 on when navigating from page 1 to page 2. all other navigation clicks and sort clicks make a GET request and then there html is refreshed with 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.
    Thursday, November 20, 2008 4:24 PM