Hi,
Using Dynamics 1.1a SP3.01.
I am wondering about the following:
I have a independent window with a browser, sdo and a filter on it.
The SDO has a batch size of 200 records. The table contains 100000 records.
My question is:
- when the filter-values are entered, the query is re-opened in the
SDO
so the first batch shows the "first" 200 records.
But my problem is that the filter does not pass the sorting of the
browser to
the query and therefore not giving the real first 200 records.
- after that, when pressing on the column in the browser to resort,
the
query is NOT reopened and again not seeing real first 200 records.
So, the way sorting and filtering works in the ADM2 is not correct and only
works in
cases where the table contains less records than the rows-to-batch.
Is this correct or am I wrong?
If I am right, is there a standard solution for this?
Best regards,
Martin Bos - mailto:martin.bos@cargomate.com
CargoMate BV - Meerwal 21 B - 3432 ZV - Nieuwegein - NL
tel. +31(0)30-6048811 - fax +31(0)30-6090000 -<http://www.cargomate.com/>
CargoMate - Global Logistics Software Solutions
Bangkok - Dubai - Amsterdam - Miami - San Francisco - Los Angeles
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
Martin,
The standard behavior is that the query is reopened when you sort from the
browser. Note that the SDO's setQuerySort does not sort, but stores the sort
until you openQuery.
We do want to support sorting on the client when all the data is there, but
this has not been implemented.
HÃ¥vard
-Original Message-
Sent: Friday, November 15, 2002 6:20 AM
To: 'dev@icf.possenet.org'
Subject: Browser/SDO sorting/filtering
Hi,
Using Dynamics 1.1a SP3.01.
I am wondering about the following:
I have a independent window with a browser, sdo and a filter on it.
The SDO has a batch size of 200 records. The table contains 100000 records.
My question is:
- when the filter-values are entered, the query is re-opened in the
SDO
so the first batch shows the "first" 200 records.
But my problem is that the filter does not pass the sorting of the
browser to
the query and therefore not giving the real first 200 records.
- after that, when pressing on the column in the browser to resort,
the
query is NOT reopened and again not seeing real first 200 records.
So, the way sorting and filtering works in the ADM2 is not correct and only
works in
cases where the table contains less records than the rows-to-batch.
Is this correct or am I wrong?
If I am right, is there a standard solution for this?
Best regards,
Martin Bos - mailto:martin.bos@cargomate.com
CargoMate BV - Meerwal 21 B - 3432 ZV - Nieuwegein - NL
tel. +31(0)30-6048811 - fax +31(0)30-6090000 -CargoMate - Global Logistics Software Solutions
Bangkok - Dubai - Amsterdam - Miami - San Francisco - Los Angeles
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
Thanx HÃ¥vard, for this info.
Martin
-Original Message-
Sent: Friday, November 15, 2002 6:53 PM
To: dev@icf.possenet.org
Subject: RE: Browser/SDO sorting/filtering
Martin,
The standard behavior is that the query is reopened when you sort from the
browser. Note that the SDO's setQuerySort does not sort, but stores the sort
until you openQuery.
We do want to support sorting on the client when all the data is there, but
this has not been implemented.
HÃ¥vard
-Original Message-
Sent: Friday, November 15, 2002 6:20 AM
To: 'dev@icf.possenet.org'
Subject: Browser/SDO sorting/filtering
Hi,
Using Dynamics 1.1a SP3.01.
I am wondering about the following:
I have a independent window with a browser, sdo and a filter on it.
The SDO has a batch size of 200 records. The table contains 100000 records.
My question is:
- when the filter-values are entered, the query is re-opened in the
SDO
so the first batch shows the "first" 200 records.
But my problem is that the filter does not pass the sorting of the
browser to
the query and therefore not giving the real first 200 records.
- after that, when pressing on the column in the browser to resort,
the
query is NOT reopened and again not seeing real first 200 records.
So, the way sorting and filtering works in the ADM2 is not correct and only
works in
cases where the table contains less records than the rows-to-batch.
Is this correct or am I wrong?
If I am right, is there a standard solution for this?
Best regards,
Martin Bos - mailto:martin.bos@cargomate.com
CargoMate BV - Meerwal 21 B - 3432 ZV - Nieuwegein - NL
tel. +31(0)30-6048811 - fax +31(0)30-6090000 -CargoMate - Global Logistics Software Solutions
Bangkok - Dubai - Amsterdam - Miami - San Francisco - Los Angeles
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
Hello all,
Just a note on sorting locally,
It's not that difficult to implement.
What you need to do is:
- Enable column searching of the browse
- Trap the start-search event (run sortColumn(input browse br_table:handle))
- Write the logic in the sortColumn procedure (which can be put in a custom
super procedure)
I wrote the sortColumn procedure like this:
PROCEDURE sortColumn :
/*
Purpose: Sorts a query related to a browse on the selected column
Parameters: input handle to browse
Notes: Stores the sort string in private data to allow switching
to ascending e descending
*/
DEFINE INPUT PARAMETER iphBrowse AS HANDLE NO-UNDO.
DEFINE VARIABLE hColumnSort AS HANDLE NO-UNDO.
DEFINE VARIABLE hColumn AS HANDLE NO-UNDO.
DEFINE VARIABLE cSortBy AS CHARACTER NO-UNDO.
DEFINE VARIABLE rROWID AS ROWID NO-UNDO.
DEFINE VARIABLE hDataSource AS HANDLE NO-UNDO.
DEFINE VARIABLE hQuery AS HANDLE NO-UNDO.
DEFINE VARIABLE hBuffer AS HANDLE NO-UNDO.
ASSIGN hColumnSort = iphBrowse:CURRENT-COLUMN.
/* reset all other browse columns */
ASSIGN hColumn = iphBrowse:FIRST-COLUMN.
DO WHILE VALID-HANDLE(hColumn):
IF hColumn NE hColumnSort THEN
ASSIGN hColumn:PRIVATE-DATA = ?.
ASSIGN hColumn = hColumn:NEXT-COLUMN.
END.
IF VALID-HANDLE(hColumnSort) THEN DO:
IF hColumnSort:PRIVATE-DATA = ? THEN
ASSIGN hColumnSort:PRIVATE-DATA = SUBSTITUTE(" BY &1":U,
hColumnSort:NAME).
ELSE DO:
IF hColumnSort:PRIVATE-DATA MATCHES "DESCENDING" THEN
ASSIGN hColumnSort:PRIVATE-DATA =
REPLACE(hColumnSort:PRIVATE-DATA,"DESCENDING":U,"":U).
ELSE
ASSIGN hColumnSort:PRIVATE-DATA = hColumnSort:PRIVATE-DATA + "
DESCENDING":U.
END.
IF hColumnSort:PRIVATE-DATA NE ? THEN DO:
cSortBy = cSortBy + hColumnSort:PRIVATE-DATA.
END.
APPLY "END-SEARCH":U TO iphBrowse.
END.
ELSE DO:
cSortBy = "".
END.
hQuery = iphBrowse:QUERY.
hBuffer = hQuery:GET-BUFFER-HANDLE(1).
rROWID = hBuffer:ROWID.
hQuery:QUERY-CLOSE().
hQuery:QUERY-PREPARE(SUBSTITUTE("for each &1 &2",
hBuffer:NAME,
cSortBy)).
hQuery:QUERY-OPEN().
hQuery:REPOSITION-TO-ROWID(rROWID) NO-ERROR.
END PROCEDURE.
HTH,
Wim
At 09:18 18/11/2002 +0100, Martin Bos wrote:
Thanx HÃ¥vard, for this info.
Martin
-Original Message-
Sent: Friday, November 15, 2002 6:53 PM
To: dev@icf.possenet.org
Subject: RE: Browser/SDO sorting/filtering
Martin,
The standard behavior is that the query is reopened when you sort from the
browser. Note that the SDO's setQuerySort does not sort, but stores the sort
until you openQuery.
We do want to support sorting on the client when all the data is there, but
this has not been implemented.
HÃ¥vard
-Original Message-
Sent: Friday, November 15, 2002 6:20 AM
To: 'dev@icf.possenet.org'
Subject: Browser/SDO sorting/filtering
Hi,
Using Dynamics 1.1a SP3.01.
I am wondering about the following:
I have a independent window with a browser, sdo and a filter on it.
The SDO has a batch size of 200 records. The table contains 100000 records.
My question is:
- when the filter-values are entered, the query is re-opened in the
SDO
so the first batch shows the "first" 200 records.
But my problem is that the filter does not pass the sorting of the
browser to
the query and therefore not giving the real first 200 records.
- after that, when pressing on the column in the browser to resort,
the
query is NOT reopened and again not seeing real first 200 records.
So, the way sorting and filtering works in the ADM2 is not correct and only
works in
cases where the table contains less records than the rows-to-batch.
Is this correct or am I wrong?
If I am right, is there a standard solution for this?
Best regards,
Martin Bos - mailto:martin.bos@cargomate.com
CargoMate BV - Meerwal 21 B - 3432 ZV - Nieuwegein - NL
tel. +31(0)30-6048811 - fax +31(0)30-6090000 -CargoMate - Global Logistics Software Solutions
Bangkok - Dubai - Amsterdam - Miami - San Francisco - Los Angeles
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
_________________________________________________
Ing. Wilhelmus van der Ham
WITS - Worldwide IT Solutions sas
di Wilhelmus van der Ham & C.
Italian partner for DWP: http://www.dynamicwebclient.info
via Motrassino, 2
10078 Venaria-Reale (TO) - Italy
Internet: http://www.wits.it
Telephone: +39-011-4527691
Mobile Phone: +39-335-6877283
Mobile Fax: +39-335-0-6877283
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
Hi Wim,
the code works fine only if you have all records on the client, but
that's not true in most cases. Usually you have only "RowsToBatch"
records on the client and in order to apply the sorting you have to
reopen the "database" query.
V.
Wim van der Ham wrote:
Hello all,
Just a note on sorting locally,
It's not that difficult to implement.
What you need to do is:
- Enable column searching of the browse
- Trap the start-search event (run sortColumn(input browse
br_table:handle))
- Write the logic in the sortColumn procedure (which can be put in a
custom super procedure)
I wrote the sortColumn procedure like this:
PROCEDURE sortColumn :
/*
Purpose: Sorts a query related to a browse on the selected column
Parameters: input handle to browse
Notes: Stores the sort string in private data to allow switching
to ascending e descending
*/
DEFINE INPUT PARAMETER iphBrowse AS HANDLE NO-UNDO.
DEFINE VARIABLE hColumnSort AS HANDLE NO-UNDO.
DEFINE VARIABLE hColumn AS HANDLE NO-UNDO.
DEFINE VARIABLE cSortBy AS CHARACTER NO-UNDO.
DEFINE VARIABLE rROWID AS ROWID NO-UNDO.
DEFINE VARIABLE hDataSource AS HANDLE NO-UNDO.
DEFINE VARIABLE hQuery AS HANDLE NO-UNDO.
DEFINE VARIABLE hBuffer AS HANDLE NO-UNDO.
ASSIGN hColumnSort = iphBrowse:CURRENT-COLUMN.
/* reset all other browse columns */
ASSIGN hColumn = iphBrowse:FIRST-COLUMN.
DO WHILE VALID-HANDLE(hColumn):
IF hColumn NE hColumnSort THEN
ASSIGN hColumn:PRIVATE-DATA = ?.
ASSIGN hColumn = hColumn:NEXT-COLUMN.
END.
IF VALID-HANDLE(hColumnSort) THEN DO:
IF hColumnSort:PRIVATE-DATA = ? THEN
ASSIGN hColumnSort:PRIVATE-DATA = SUBSTITUTE(" BY &1":U,
hColumnSort:NAME).
ELSE DO:
IF hColumnSort:PRIVATE-DATA MATCHES "DESCENDING" THEN
ASSIGN hColumnSort:PRIVATE-DATA =
REPLACE(hColumnSort:PRIVATE-DATA,"DESCENDING":U,"":U).
ELSE
ASSIGN hColumnSort:PRIVATE-DATA = hColumnSort:PRIVATE-DATA +
" DESCENDING":U.
END.
IF hColumnSort:PRIVATE-DATA NE ? THEN DO:
cSortBy = cSortBy + hColumnSort:PRIVATE-DATA.
END.
APPLY "END-SEARCH":U TO iphBrowse.
END.
ELSE DO:
cSortBy = "".
END.
hQuery = iphBrowse:QUERY.
hBuffer = hQuery:GET-BUFFER-HANDLE(1).
rROWID = hBuffer:ROWID.
hQuery:QUERY-CLOSE().
hQuery:QUERY-PREPARE(SUBSTITUTE("for each &1 &2",
hBuffer:NAME,
cSortBy)).
hQuery:QUERY-OPEN().
hQuery:REPOSITION-TO-ROWID(rROWID) NO-ERROR.
END PROCEDURE.
HTH,
Wim
At 09:18 18/11/2002 +0100, Martin Bos wrote:
Thanx HÃ¥vard, for this info.
Martin
-Original Message-
Sent: Friday, November 15, 2002 6:53 PM
To: dev@icf.possenet.org
Subject: RE: Browser/SDO sorting/filtering
Martin,
The standard behavior is that the query is reopened when you sort from
the
browser. Note that the SDO's setQuerySort does not sort, but stores
the sort
until you openQuery.
We do want to support sorting on the client when all the data is
there, but
this has not been implemented.
HÃ¥vard
-Original Message-
Sent: Friday, November 15, 2002 6:20 AM
To: 'dev@icf.possenet.org'
Subject: Browser/SDO sorting/filtering
Hi,
Using Dynamics 1.1a SP3.01.
I am wondering about the following:
I have a independent window with a browser, sdo and a filter on it.
The SDO has a batch size of 200 records. The table contains 100000
records.
My question is:
- when the filter-values are entered, the query is re-opened in the
SDO
so the first batch shows the "first" 200 records.
But my problem is that the filter does not pass the sorting of
the
browser to
the query and therefore not giving the real first 200 records.
- after that, when pressing on the column in the browser to resort,
the
query is NOT reopened and again not seeing real first 200
records.
So, the way sorting and filtering works in the ADM2 is not correct and
only
works in
cases where the table contains less records than the rows-to-batch.
Is this correct or am I wrong?
If I am right, is there a standard solution for this?
Best regards,
Martin Bos - mailto:martin.bos@cargomate.com
CargoMate BV - Meerwal 21 B - 3432 ZV - Nieuwegein - NL
tel. +31(0)30-6048811 - fax +31(0)30-6090000 -CargoMate - Global Logistics Software Solutions
Bangkok - Dubai - Amsterdam - Miami - San Francisco - Los Angeles
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
_________________________________________________
Ing. Wilhelmus van der Ham
WITS - Worldwide IT Solutions sas
di Wilhelmus van der Ham & C.
Italian partner for DWP: http://www.dynamicwebclient.info
via Motrassino, 2
10078 Venaria-Reale (TO) - Italy
Internet: http://www.wits.it
Telephone: +39-011-4527691
Mobile Phone: +39-335-6877283
Mobile Fax: +39-335-0-6877283
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
--
=======================================================================
Vladimir Zalda | Progress Software Europe B.V.
E-Mail: vza@progress.com | Empowerment Center, EMEA
Phone: +31 (0)10-2865700 | Schorpioenstraat 67, Box 8644
Fax: +31 (0)10-2865225 | 3067 GG Rotterdam, NL
=======================================================================
Techsupport Direct |
Check out http://www.progress.com/services/support/index.htm |
Support email: emeasupport@progress.com |
===================================================================== |
Who tickles by himself, he laughs when he wants to. |
Kdo se lechta sam, smeje se kdy chce. |
-- VZA |
=======================================================================
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
At 16:52 18/11/2002 +0100, you wrote:
Hi Wim,
the code works fine only if you have all records on the client, but
that's not true in most cases. Usually you have only "RowsToBatch" records
on the client and in order to apply the sorting you have to reopen the
"database" query.
Right.
That's what the standard setQuerySort function is for which works ok.
HÃ¥vard wrote:
We do want to support sorting on the client when all the data is there, but
this has not been implemented.
I just noted that it's easy to implement in one procedure.
Of course it would be nice if the sorting on a column was made visible in
same way but since Progress doesn't support Images in combination with text
it's not easy to do.
Ciao,
Wim
V.
Wim van der Ham wrote:
Hello all,
Just a note on sorting locally,
It's not that difficult to implement.
What you need to do is:
- Enable column searching of the browse
- Trap the start-search event (run sortColumn(input browse br_table:handle))
- Write the logic in the sortColumn procedure (which can be put in a
custom super procedure)
I wrote the sortColumn procedure like this:
PROCEDURE sortColumn :
/*
Purpose: Sorts a query related to a browse on the selected column
Parameters: input handle to browse
Notes: Stores the sort string in private data to allow switching
to ascending e descending
*/
DEFINE INPUT PARAMETER iphBrowse AS HANDLE NO-UNDO.
DEFINE VARIABLE hColumnSort AS HANDLE NO-UNDO.
DEFINE VARIABLE hColumn AS HANDLE NO-UNDO.
DEFINE VARIABLE cSortBy AS CHARACTER NO-UNDO.
DEFINE VARIABLE rROWID AS ROWID NO-UNDO.
DEFINE VARIABLE hDataSource AS HANDLE NO-UNDO.
DEFINE VARIABLE hQuery AS HANDLE NO-UNDO.
DEFINE VARIABLE hBuffer AS HANDLE NO-UNDO.
ASSIGN hColumnSort = iphBrowse:CURRENT-COLUMN.
/* reset all other browse columns */
ASSIGN hColumn = iphBrowse:FIRST-COLUMN.
DO WHILE VALID-HANDLE(hColumn):
IF hColumn NE hColumnSort THEN
ASSIGN hColumn:PRIVATE-DATA = ?.
ASSIGN hColumn = hColumn:NEXT-COLUMN.
END.
IF VALID-HANDLE(hColumnSort) THEN DO:
IF hColumnSort:PRIVATE-DATA = ? THEN
ASSIGN hColumnSort:PRIVATE-DATA = SUBSTITUTE(" BY &1":U,
hColumnSort:NAME).
ELSE DO:
IF hColumnSort:PRIVATE-DATA MATCHES "DESCENDING" THEN
ASSIGN hColumnSort:PRIVATE-DATA =
REPLACE(hColumnSort:PRIVATE-DATA,"DESCENDING":U,"":U).
ELSE
ASSIGN hColumnSort:PRIVATE-DATA = hColumnSort:PRIVATE-DATA +
" DESCENDING":U.
END.
IF hColumnSort:PRIVATE-DATA NE ? THEN DO:
cSortBy = cSortBy + hColumnSort:PRIVATE-DATA.
END.
APPLY "END-SEARCH":U TO iphBrowse.
END.
ELSE DO:
cSortBy = "".
END.
hQuery = iphBrowse:QUERY.
hBuffer = hQuery:GET-BUFFER-HANDLE(1).
rROWID = hBuffer:ROWID.
hQuery:QUERY-CLOSE().
hQuery:QUERY-PREPARE(SUBSTITUTE("for each &1 &2",
hBuffer:NAME,
cSortBy)).
hQuery:QUERY-OPEN().
hQuery:REPOSITION-TO-ROWID(rROWID) NO-ERROR.
END PROCEDURE.
HTH,
Wim
At 09:18 18/11/2002 +0100, Martin Bos wrote:
Thanx HÃ¥vard, for this info.
Martin
-Original Message-
Sent: Friday, November 15, 2002 6:53 PM
To: dev@icf.possenet.org
Subject: RE: Browser/SDO sorting/filtering
Martin,
The standard behavior is that the query is reopened when you sort from the
browser. Note that the SDO's setQuerySort does not sort, but stores the sort
until you openQuery.
We do want to support sorting on the client when all the data is there, but
this has not been implemented.
HÃ¥vard
-Original Message-
Sent: Friday, November 15, 2002 6:20 AM
To: 'dev@icf.possenet.org'
Subject: Browser/SDO sorting/filtering
Hi,
Using Dynamics 1.1a SP3.01.
I am wondering about the following:
I have a independent window with a browser, sdo and a filter on it.
The SDO has a batch size of 200 records. The table contains 100000 records.
My question is:
- when the filter-values are entered, the query is re-opened in the
SDO
so the first batch shows the "first" 200 records.
But my problem is that the filter does not pass the sorting of the
browser to
the query and therefore not giving the real first 200 records.
- after that, when pressing on the column in the browser to resort,
the
query is NOT reopened and again not seeing real first 200 records.
So, the way sorting and filtering works in the ADM2 is not correct and only
works in
cases where the table contains less records than the rows-to-batch.
Is this correct or am I wrong?
If I am right, is there a standard solution for this?
Best regards,
Martin Bos - mailto:martin.bos@cargomate.com
CargoMate BV - Meerwal 21 B - 3432 ZV - Nieuwegein - NL
tel. +31(0)30-6048811 - fax +31(0)30-6090000 -CargoMate - Global Logistics Software Solutions
Bangkok - Dubai - Amsterdam - Miami - San Francisco - Los Angeles
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
_________________________________________________
Ing. Wilhelmus van der Ham
WITS - Worldwide IT Solutions sas
di Wilhelmus van der Ham & C.
Italian partner for DWP: http://www.dynamicwebclient.info
via Motrassino, 2
10078 Venaria-Reale (TO) - Italy
Internet: http://www.wits.it
Telephone: +39-011-4527691
Mobile Phone: +39-335-6877283
Mobile Fax: +39-335-0-6877283
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
--
=======================================================================
Vladimir Zalda | Progress Software Europe B.V.
E-Mail: vza@progress.com | Empowerment Center, EMEA
Phone: +31 (0)10-2865700 | Schorpioenstraat 67, Box 8644
Fax: +31 (0)10-2865225 | 3067 GG Rotterdam, NL
=======================================================================
|Techsupport Direct |
|Check out http://www.progress.com/services/support/index.htm |
| |
|Support email: emeasupport@progress.com |
|=====================================================================|
| |
| Who tickles by himself, he laughs when he wants to. |
| Kdo se lechta sam, smeje se kdy chce. |
| -- VZA |
| |
=======================================================================
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
_________________________________________________
Ing. Wilhelmus van der Ham
WITS - Worldwide IT Solutions sas
di Wilhelmus van der Ham & C.
Italian partner for DWP: http://www.dynamicwebclient.info
via Motrassino, 2
10078 Venaria-Reale (TO) - Italy
Internet: http://www.wits.it
Telephone: +39-011-4527691
Mobile Phone: +39-335-6877283
Mobile Fax: +39-335-0-6877283
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
One could of course add a check to ensure that all data is on the client
with something like this (use dynamic-fucntion) .
getIsDataOnClient returns logical():
return getLastRowNum() <? and getFirstRowNum() <?.
end.
It is probably also better to add the new query to the DataQuery property
and call openDataQuery() to open, so that the sort stays intact when the
query is reopened, for example when adding a new record. This would also
require that ir is reset to default in openQuery.
HÃ¥vard
-Original Message-
Sent: Tuesday, November 19, 2002 3:01 AM
To: dev@icf.possenet.org
Subject: Re: Browser/SDO sorting/filtering
At 16:52 18/11/2002 +0100, you wrote:
Hi Wim,
the code works fine only if you have all records on the client, but
that's not true in most cases. Usually you have only "RowsToBatch" records
on the client and in order to apply the sorting you have to reopen the
"database" query.
Right.
That's what the standard setQuerySort function is for which works ok.
HÃ¥vard wrote:
We do want to support sorting on the client when all the data is there,
but
this has not been implemented.
I just noted that it's easy to implement in one procedure.
Of course it would be nice if the sorting on a column was made visible in
same way but since Progress doesn't support Images in combination with text
it's not easy to do.
Ciao,
Wim
V.
Wim van der Ham wrote:
Hello all,
Just a note on sorting locally,
It's not that difficult to implement.
What you need to do is:
- Enable column searching of the browse
- Trap the start-search event (run sortColumn(input browse
br_table:handle))
- Write the logic in the sortColumn procedure (which can be put in a
custom super procedure)
I wrote the sortColumn procedure like this:
PROCEDURE sortColumn :
/*
Purpose: Sorts a query related to a browse on the selected column
Parameters: input handle to browse
Notes: Stores the sort string in private data to allow switching
to ascending e descending
*/
DEFINE INPUT PARAMETER iphBrowse AS HANDLE NO-UNDO.
DEFINE VARIABLE hColumnSort AS HANDLE NO-UNDO.
DEFINE VARIABLE hColumn AS HANDLE NO-UNDO.
DEFINE VARIABLE cSortBy AS CHARACTER NO-UNDO.
DEFINE VARIABLE rROWID AS ROWID NO-UNDO.
DEFINE VARIABLE hDataSource AS HANDLE NO-UNDO.
DEFINE VARIABLE hQuery AS HANDLE NO-UNDO.
DEFINE VARIABLE hBuffer AS HANDLE NO-UNDO.
ASSIGN hColumnSort = iphBrowse:CURRENT-COLUMN.
/* reset all other browse columns */
ASSIGN hColumn = iphBrowse:FIRST-COLUMN.
DO WHILE VALID-HANDLE(hColumn):
IF hColumn NE hColumnSort THEN
ASSIGN hColumn:PRIVATE-DATA = ?.
ASSIGN hColumn = hColumn:NEXT-COLUMN.
END.
IF VALID-HANDLE(hColumnSort) THEN DO:
IF hColumnSort:PRIVATE-DATA = ? THEN
ASSIGN hColumnSort:PRIVATE-DATA = SUBSTITUTE(" BY &1":U,
hColumnSort:NAME).
ELSE DO:
IF hColumnSort:PRIVATE-DATA MATCHES "DESCENDING" THEN
ASSIGN hColumnSort:PRIVATE-DATA =
REPLACE(hColumnSort:PRIVATE-DATA,"DESCENDING":U,"":U).
ELSE
ASSIGN hColumnSort:PRIVATE-DATA = hColumnSort:PRIVATE-DATA +
" DESCENDING":U.
END.
IF hColumnSort:PRIVATE-DATA NE ? THEN DO:
cSortBy = cSortBy + hColumnSort:PRIVATE-DATA.
END.
APPLY "END-SEARCH":U TO iphBrowse.
END.
ELSE DO:
cSortBy = "".
END.
hQuery = iphBrowse:QUERY.
hBuffer = hQuery:GET-BUFFER-HANDLE(1).
rROWID = hBuffer:ROWID.
hQuery:QUERY-CLOSE().
hQuery:QUERY-PREPARE(SUBSTITUTE("for each &1 &2",
hBuffer:NAME,
cSortBy)).
hQuery:QUERY-OPEN().
hQuery:REPOSITION-TO-ROWID(rROWID) NO-ERROR.
END PROCEDURE.
HTH,
Wim
At 09:18 18/11/2002 +0100, Martin Bos wrote:
Thanx HÃ¥vard, for this info.
Martin
-Original Message-
Sent: Friday, November 15, 2002 6:53 PM
To: dev@icf.possenet.org
Subject: RE: Browser/SDO sorting/filtering
Martin,
The standard behavior is that the query is reopened when you sort from
the
browser. Note that the SDO's setQuerySort does not sort, but stores the
sort
until you openQuery.
We do want to support sorting on the client when all the data is there,
but
this has not been implemented.
HÃ¥vard
-Original Message-
Sent: Friday, November 15, 2002 6:20 AM
To: 'dev@icf.possenet.org'
Subject: Browser/SDO sorting/filtering
Hi,
Using Dynamics 1.1a SP3.01.
I am wondering about the following:
I have a independent window with a browser, sdo and a filter on it.
The SDO has a batch size of 200 records. The table contains 100000
records.
My question is:
- when the filter-values are entered, the query is re-opened in the
SDO
so the first batch shows the "first" 200 records.
But my problem is that the filter does not pass the sorting of
the
browser to
the query and therefore not giving the real first 200 records.
- after that, when pressing on the column in the browser to resort,
the
query is NOT reopened and again not seeing real first 200
records.
So, the way sorting and filtering works in the ADM2 is not correct and
only
works in
cases where the table contains less records than the rows-to-batch.
Is this correct or am I wrong?
If I am right, is there a standard solution for this?
Best regards,
Martin Bos - mailto:martin.bos@cargomate.com
CargoMate BV - Meerwal 21 B - 3432 ZV - Nieuwegein - NL
tel. +31(0)30-6048811 - fax +31(0)30-6090000 -CargoMate - Global Logistics Software Solutions
Bangkok - Dubai - Amsterdam - Miami - San Francisco - Los Angeles
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
_________________________________________________
Ing. Wilhelmus van der Ham
WITS - Worldwide IT Solutions sas
di Wilhelmus van der Ham & C.
Italian partner for DWP: http://www.dynamicwebclient.info
via Motrassino, 2
10078 Venaria-Reale (TO) - Italy
Internet: http://www.wits.it
Telephone: +39-011-4527691
Mobile Phone: +39-335-6877283
Mobile Fax: +39-335-0-6877283
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
--
=======================================================================
Vladimir Zalda | Progress Software Europe B.V.
E-Mail: vza@progress.com | Empowerment Center, EMEA
Phone: +31 (0)10-2865700 | Schorpioenstraat 67, Box 8644
Fax: +31 (0)10-2865225 | 3067 GG Rotterdam, NL
=======================================================================
|Techsupport Direct |
|Check out http://www.progress.com/services/support/index.htm |
| |
|Support email: emeasupport@progress.com |
|=====================================================================|
| |
| Who tickles by himself, he laughs when he wants to. |
| Kdo se lechta sam, smeje se kdy chce. |
| -- VZA |
| |
=======================================================================
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
_________________________________________________
Ing. Wilhelmus van der Ham
WITS - Worldwide IT Solutions sas
di Wilhelmus van der Ham & C.
Italian partner for DWP: http://www.dynamicwebclient.info
via Motrassino, 2
10078 Venaria-Reale (TO) - Italy
Internet: http://www.wits.it
Telephone: +39-011-4527691
Mobile Phone: +39-335-6877283
Mobile Fax: +39-335-0-6877283
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org