none
report viewer group on RRS feed

  • Question

  • I am using report viewer and VB 2005 pro. I have a sorting question. Using the group on I have =Fields!Partnum.Value  this is what the report is mapped by. The only problem is that the sort order is correct for a string. I need it to be sorted as an Integer. There are single and multiple numbers and they are being sorted by the primary numbers not the values.

    String        Iteger
    1                 1
    200             3
    3                 4
    4                50
    50              200
    • Moved by Martin Xie - MSFT Wednesday, September 23, 2009 7:13 AM Move it to Report Control forum for better support. (From:Visual Basic General)
    Tuesday, September 22, 2009 1:55 PM

All replies

  • I am using report viewer and VB 2005 pro. I have a sorting question. Using the group on I have =Fields!Partnum.Value  this is what the report is mapped by. The only problem is that the sort order is correct for a string. I need it to be sorted as an Integer. There are single and multiple numbers and they are being sorted by the primary numbers not the values.

    String        Iteger
    1                 1
    200             3
    3                 4
    4                50
    50              200
    wait...do you have two table? if that is the case do the table have a relationship? do you have this two firld in the same table?

    if you have it, the reason why the intenger is not sorted its bacause you have it in that order....in you table.....
    intenger....
    1
    3
    4
    50
    200
    Don't judge me, just Upgrade me. Thanks!
    Tuesday, September 22, 2009 2:08 PM
  • I have one table. When I group on =Fields!Partnum.Value I get
           
    1                
    200             
    3                
    4               
    50  
    I would like it to be

       1
       3
       4
       50
       200

    Tuesday, September 22, 2009 2:25 PM
  • It looks like your data is not Numeric. If you convert your values to Numeric you will get the right sort order.
    Wednesday, August 18, 2010 10:06 PM
  • Hi,

       Simply put expression on Sort =VAL(Fields!Partnum.Value) and choose required sorting order i.e. A-Z/Z-A.

     

    Hope it will solve your problem.


    Aftab Ansari
    Thursday, August 19, 2010 7:08 AM