views:

68

answers:

0

The application I am working on is generating .rdlc files that will end up being interpreted by Microsoft's WinForms ReportViewer control (not the ASP.NET one).

I have only been partially successful with adding the interactive 'sort direction' controls on to these reports. The controls appear on each column and row in the report, when you click them they point up or down, but nothing is never actually sorted.

I've added a 'UserSort' element under each heading. The 'UserSort' element has one subelement, 'SortExpression'. In here I put the same sort expression that I use for the default sort order.

So, it looks more or less like this:

 <RowGroupings>
   <RowGrouping>
     <Width>1.25in</Width>
     <DynamicRows>
       <Sorting>blah blah</Sorting>
       <Grouping>blah blah</Grouping>
       <ReportItems>
         <Textbox Name="RowStatusTextboxName">
           <UserSort>
             <SortExpression>=Fields!Status.Value</SortExpression>
           </UserSort>
         </Textbox>
       </ReportItems>
     </DynamicRows>
   </RowGrouping>
 </RowGroupings>

According to the RDL 2005 spec [pdf], this should all be correct, I think.

What I am probably doing wrong is putting the UserSort under the wrong element, but I am just not sure anymore.

Any help is greatly appreciated!