Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Multi level sorting
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Multi level sorting

 Post Reply Post Reply
Author
Message
sunbeam View Drop Down
Newbie
Newbie
Avatar

Joined: 20 March 2007
Location: Belgium
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote sunbeam Quote  Post ReplyReply Direct Link To This Post Topic: Multi level sorting
    Posted: 27 January 2008 at 6:38am
Hi,
 
Is it possible in the ReportControl to sort on one column, than sort on another column within that column, than sort on another column within that second column etc... without grouping them together?
 
Thanks in advance
Back to Top
wlcabral View Drop Down
Groupie
Groupie
Avatar

Joined: 25 April 2007
Location: Brazil
Status: Offline
Points: 72
Post Options Post Options   Thanks (0) Thanks(0)   Quote wlcabral Quote  Post ReplyReply Direct Link To This Post Posted: 27 January 2008 at 12:19pm

Codejock's help :


Example
[Visual Basic] This sample illustrates how to sort the columns in the ReportControl. If you had 8 columns added to the ReportControl, this sample would sort the columns first by the column at Itemindex 7, then by the column at ItemIndex 2, then by the column at ItemIndex 5.


    'This code below will add three columns to the SortOrder collection of coluns.
    'This will cause the columns in the ReportControl to first be sorted by column 7,
    'which has an index of zero (0) in the SortOrder collection. Columns are first sorted
    'in the order that they are added to the SortOrder collection.

    wndReportControl.SortOrder.Add wndReportControl.Columns(7)
    wndReportControl.SortOrder.Add wndReportControl.Columns(2)
    wndReportControl.SortOrder.Add wndReportControl.Columns(5)

    'This will cause the column at index 1 of the SortOrder collection to be sorted
    'in descending order.
    wndReportControl.SortOrder(1).SortAscending = False

    'Any time you add or delete columns to the SortOrder or GroupOrder collections,
    'the Populate method must be called to show the changes in the ReportControl's view.

    wndReportControl.Populate

 

Example
[Visual Basic] This sample illustrates how to remove all columns from the ReportControl's collection of SortOrder and GroupOrder columns.


    'Removes all columns from the ReportControl's GroupsOrder collection
    wndReportControl.GroupsOrder.DeleteAll

    'Removes all columns from the ReportControl's SortOrder collection
    wndReportControl.SortOrder.DeleteAll

wlcabral
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.297 seconds.