Sort Dynamically

wolftechwolftech Member Posts: 54
Hi Experts,

Is it possible to sort the report and Forms Dynamically, I.e based on user selection the sorting of report or list form should be sorted.

eg: if User Selects date the Sale order list should be sorted in Date wise ascending , if user selects Customer, then customer wise sorting in the list, is it possible.
Thanks

Madhu

--He Who Ask question is a fool for 5 Minutes , he who does not ask remains fool forever--

Comments

  • David_SingletonDavid_Singleton Member Posts: 5,479
    This can be done, but its not some global setting. You need to code it for each table that you want to do this for. Take a look at the warehouse pick form to see how its done.
    David Singleton
  • kapamaroukapamarou Member Posts: 1,152
    No. You can sort only with the available keys...
  • krikikriki Member, Moderator Posts: 9,110
    There is another trick:

    You need a new table as follows:
    10 : Primary Key : integer
    100 : Sort-key : text 240
    110... extra fields

    "Primary Key" is the field with an integer. you need this the record unique.
    "Sort-key" : is the field you fill up with the fields on which you want to sort on. Separate the fields using a TAB character. You also need to put a key on this field. When reading the table, you sort on this field and have the records in the order in which you want them.

    This table does not need to be licensed because you will ONLY use it as a temptable.

    So:
    1) read all records in the way that is the fastest to retrieve them from the DB and insert them in the temptable with in "sort-key" the fields on which you want to sort.
    2) read the temptable ordered by field "sort-key".
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.