sort data

hi guys.

i want to sort data as DESC, my code is :

report1.Load("C:\\test.frx");
(report1.FindObject("Data1") as DataBand).Sort.Add(new Sort("[Product.Cost]"));


now, how to sort data on descending???

help me

Comments

  • edited 5:41PM
    Something like this should work:

    new sort("what", order) // order => false = asc, true = desc

    (report1.FindObject("Data1") as DataBand).Sort.Add(new Sort("[Product.Cost]", true));

    or

    SortCollection sortedSource = new SortCollection();
    Sort s = new Sort("Data1.Product.Cost", true);
    // you can add more sort definitions
    sortedSource.Add(s);
    than use sortedSource as datasource

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.