none
Interactive Sort of Date & Amount Fields RRS feed

  • Question

  •  

    Greetings:

    I've got interactive sorting working just fine in my reports with the exception that all fields are sorted as if they were strings.  This means that decimal values and date fields do not sort properly.   How do I get an interactive sort to sort dates and decimal amounts properly?

     

    -MadGerbil

    Friday, April 4, 2008 1:53 PM

Answers

  •  

    I decided against interactive sorting personally, since I needed to provide my users with up to 3 layers of sorting, and it looked like the interactive sorting worked like most table sorts where it just sorts off one column at a time.   So I haven't worked with it personally,  I see the setup for it appears to be that you just point it to the field you want to sort by and your done.   Which is consistent with other sorting options in the tables.

     

    So my first question would be, are you sure the values are being attached to the report as the correct data type?  To be sure you'd have to check in two places,  first the field your sorting on, when it's returned from the database, is it an  int, or currency or whatever it's supposed to be, or is a string?

     

    Then the other place to check would be the actual .RDLC file.  You can just open it in an xml editor, go down to the datasources and you'll see the system.datatype associated with each field, and be sure they are labeled as the correct datatypes.    I could be wrong, but I think this type will get overwritten if the data being sent in comes in as a different type.

     

    For instance  Fields!Field1  is listed in the .RDLC as an INT, but when you hand it the datasource, the datasource identifies it as a string...and now the report handles it like a string type.

    Friday, April 4, 2008 2:59 PM