Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #9552 > unrolled thread
| Started by | Martin <Martin@spam.spam> |
|---|---|
| First post | 2016-07-25 14:30 +0100 |
| Last post | 2016-07-26 17:12 +0100 |
| Articles | 7 — 3 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
BBrowser question Martin <Martin@spam.spam> - 2016-07-25 14:30 +0100
Re: BBrowser question "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-07-25 17:34 +0200
Re: BBrowser question sherlocksoftware@gmail.com - 2016-07-26 03:30 -0700
Re: BBrowser question Martin <Martin@spam.spam> - 2016-07-26 17:12 +0100
Re: BBrowser question "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-07-26 21:22 +0200
Re: BBrowser question Martin <Martin@spam.spam> - 2016-07-27 16:06 +0100
Re: BBrowser question Martin <Martin@spam.spam> - 2016-07-26 17:12 +0100
| From | Martin <Martin@spam.spam> |
|---|---|
| Date | 2016-07-25 14:30 +0100 |
| Subject | BBrowser question |
| Message-ID | <nn548s$qvg$1@dont-email.me> |
Had a request from a customer. Can we reverse a browse so the largest key value is at the top rather than bottom? All I can find is that is follow the current order of the file. But they want it reversed. Newest at top. Any ideas please?
[toc] | [next] | [standalone]
| From | "Wolfgang Riedmann" <wriedmann@gmail.com> |
|---|---|
| Date | 2016-07-25 17:34 +0200 |
| Message-ID | <dvmps4FmvitU1@mid.individual.net> |
| In reply to | #9552 |
Hi Johan, > 4. Create a Descending index on the DB, does not matter then if you > answered yes to 1 or 2. Just set order to preferred order and > refresh the browser if answer is 1. with DBFCDX you can change the ascending/descending with the OrderDescend() method on the fly (for the current DBServer object). Wolfgang P.S. extract from the help: DBServer:OrderDescend() Method Purpose Return and optionally change the descending flag of an order. Syntax <oDBServer>:OrderDescend([<cOrder> | <nPosition>], [<oFSIndexFile> | <cIndexFile>], [<lNewDescend>]) ---> lCurrentDescend --
[toc] | [prev] | [next] | [standalone]
| From | sherlocksoftware@gmail.com |
|---|---|
| Date | 2016-07-26 03:30 -0700 |
| Message-ID | <6871c02b-3085-465c-8906-ef94d875469e@googlegroups.com> |
| In reply to | #9552 |
snip[ Can we reverse a browse so the largest key value is at the top rather
than bottom? Any ideas please? ]
The way I did this is add a checkbox that they might want to see Descend and you build a forward and reverse index at the same time using CUSTOM index.
You have 2 tags and switch between tags.
// ------------------------------- CUSTOM
SELF:SetOrderCondition(,,,,,,,,,,,,, TRUE)
SELF:CreateOrder( 'VOFTS', SELF:cPath + cTmpIndex, cIndexKey, cbIndexKey, FALSE )
//
IF lReverseON // Set as a Custom Roll your own index + DESCENDING
// ---------------------- ADDITIVE + CUSTOM + DESCENDING
SELF:SetOrderCondition(,,,,,,,,,,TRUE,TRUE,,TRUE)
SELF:CreateOrder( 'VOFTSREV', SELF:cPath + cTmpRIndex, cIndexKey, cbIndexKey, FALSE ) // Reverse TAG
ENDIF
Phil McGuinness
[toc] | [prev] | [next] | [standalone]
| From | Martin <Martin@spam.spam> |
|---|---|
| Date | 2016-07-26 17:12 +0100 |
| Message-ID | <nn824d$c45$1@dont-email.me> |
| In reply to | #9554 |
Using ADS And already about 40 indexes On 26/07/2016 11:30, sherlocksoftware@gmail.com wrote: > snip[ Can we reverse a browse so the largest key value is at the top rather > than bottom? Any ideas please? ] > > The way I did this is add a checkbox that they might want to see Descend and you build a forward and reverse index at the same time using CUSTOM index. > You have 2 tags and switch between tags. > > // ------------------------------- CUSTOM > SELF:SetOrderCondition(,,,,,,,,,,,,, TRUE) > SELF:CreateOrder( 'VOFTS', SELF:cPath + cTmpIndex, cIndexKey, cbIndexKey, FALSE ) > // > IF lReverseON // Set as a Custom Roll your own index + DESCENDING > // ---------------------- ADDITIVE + CUSTOM + DESCENDING > SELF:SetOrderCondition(,,,,,,,,,,TRUE,TRUE,,TRUE) > SELF:CreateOrder( 'VOFTSREV', SELF:cPath + cTmpRIndex, cIndexKey, cbIndexKey, FALSE ) // Reverse TAG > ENDIF > > Phil McGuinness >
[toc] | [prev] | [next] | [standalone]
| From | "Wolfgang Riedmann" <wriedmann@gmail.com> |
|---|---|
| Date | 2016-07-26 21:22 +0200 |
| Message-ID | <dvprkkFfjoeU1@mid.individual.net> |
| In reply to | #9556 |
> Using ADS > > And already about 40 indexes where is the problem? ADS CAN use OrderDescend() and reverse the order on the fly on existing orders without changung the order itself. Wolfgang --
[toc] | [prev] | [next] | [standalone]
| From | Martin <Martin@spam.spam> |
|---|---|
| Date | 2016-07-27 16:06 +0100 |
| Message-ID | <nnail0$5s6$1@dont-email.me> |
| In reply to | #9558 |
OK we willgive that a try and see what happens Thanks Martin On 26/07/2016 20:22, Wolfgang Riedmann wrote: >> Using ADS >> >> And already about 40 indexes > > where is the problem? ADS CAN use OrderDescend() and reverse the order > on the fly on existing orders without changung the order itself. > > Wolfgang > >
[toc] | [prev] | [next] | [standalone]
| From | Martin <Martin@spam.spam> |
|---|---|
| Date | 2016-07-26 17:12 +0100 |
| Message-ID | <nn824j$c45$2@dont-email.me> |
| In reply to | #9552 |
Using ADS And already about 40 indexes On 25/07/2016 14:55, Johan Nel wrote: > Martin, > > On 2016/07/25 15:30, Martin wrote: >> Had a request from a customer. >> >> Can we reverse a browse so the largest key value is at the top rather >> than bottom? >> >> All I can find is that is follow the current order of the file. But >> they want it reversed. >> >> Newest at top. >> >> Any ideas please? > Do they want at runtime(1) to do it, or is it fixed(2)? What is the > database [SQL(3)/DBF(4)] that the data is stored in? > > Depending your answer: > > 1. This depends on 3/4. > > 2. Again depends on 3/4. > > 3. If 1 then refesh from SQL with correct ORDER BY clause, (somebody > need to maybe comment on this one since it is ages since I last worked > on VO and bBrowser), not sure if it is possible with > VO2ADO/SqlSelect/SqlTable to change the ORDER BY on the in memory > "Server/Table". If 2 then ensure your ORDER BY brings the rows back in > DESC order. > > 4. Create a Descending index on the DB, does not matter then if you > answered yes to 1 or 2. Just set order to preferred order and refresh > the browser if answer is 1. > > HTH, > > -- > *Johan Nel* > George, South Africa > > > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > Virus-free. www.avast.com > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > >
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web