Sort Order

Hi,

Using the API version of LL.

In my development package we dont deal with SQL if we dont absolutely have to, instead we use a Query (This is in fact generates the SQL).

In a query I can make a sort order, but this is design not “User changeable” so I ship the unsorted data to LL and sort the data in the report(!?) as it should be? - no?

It seems to be I can have a one level sort with the (now undocumented) functions LlDefineSortOrderStart & LlDefineSortOrderA? - But they just wont work. I don`t get any errormessage returned, but no sorting neither.

The other sort functions seems to rely on some sort of callback to a already sorted structure? or am I wrong?

I can use a lot of time, building a string containing the SQL statement where the user can select sort order resulting in a “Order by xxx” statement added to the string.
Before executing it against the SQL server and sending data off to LL.

But this seems like a lot unnecessarily hassle/coding just for the sort of data.?

I replaced my old 250$ report generator (Works a bit like LL in that we add the source data to the report engine) with LL20 Pro, and in this old thingy I just add “Sort bands” and as many as I like, so that 3 different reports can have 3 totally different sort orders, still coming from the same unsorted data source.

Or have I missed something? (it would not be the first time.)

Dear Henriksen,
thank you for your post.

The LlDefineSortOrderStart and LlDefineSortOrder API is used correctly as followed:

       nRet := LlDefineFieldExt(hJob, cFieldName, FldContent, FldType, 0 )
       nRet := LlDefineSortOrderStart()
       nRet := LlDefineSortOrder(hJob, PRICEPP, cFieldName)

Important note:
This API has been set to obsolete for many versions cause the sorting with this API only works with non Ribbon menus (see in the designer menu>project>Sort the data).

If you want to use the sort and the Ribbon menu you have to use the reportcontainer (LlDbAddTable()) and the
LlDbAddTableSortOrder() api.

For further informations about the API´s we recommended to use the programmers reference manual, thank you.

Kind regards
Erdal Alacali
combit Software GmbH
Technical support