Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #7825

Re: bBRowser recordgroups

From "Paul D B" <pdb@NOMORESPAMhnt.be>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: bBRowser recordgroups
Date 2015-03-04 16:40 +0100
Organization A noiseless patient Spider
Message-ID <md78ve$idn$1@dont-email.me> (permalink)
References <mbd48o$nfd$1@dont-email.me> <ckppnfF7cqpU1@mid.individual.net>

Show all headers | View raw


Hi Urs, sorry for my late reply, I've been very busy... :-(

Yes it would be a possibility: but first of all I cannot easily change this 
DBF. And, it would only be a solution to group on one field. But in this 
case, the user can click on any column and sort/group on it. Just like in 
Windows File Explorer (when you activate the "grouping", of course). And 
just like there I would like to see the number of items in each group.


Paul

"Urs Eggmann"  schreef in bericht news:ckppnfF7cqpU1@mid.individual.net...

Hi Paul,

Just a idea, not jet proved... Only a piece of pseudocode.

Add a additional field "LengthGroup" to your database.

Method AnalyseGroup() class ....
// Do it for each record, loop, codeblock ....
Do case
    case Between(dbServer:Fieldget(#Distance , 0 , 100 )
    dbServer:Fieldput(#LengthGroup , 1 )
case Between(dbServer:Fieldget(#Distance  , 100 , 500 )
    dbServer:Fieldput(#LengthGroup , 2 )
    .... and so on
    otherwise
        Return False
endcase
return true

Run this Method once and afterwards for each new record when entering it.
Then use this field for grouping. Exclude the group field from showing in
the browser.

regards
Urs


"Paul D B" <pdb@NOMORESPAMhnt.be> schrieb im Newsbeitrag
news:mbd48o$nfd$1@dont-email.me...
> Hi all,
>
> Can anyone tell me if this is possible?
>
> I have a numeric field in my DBF with distances (lengths). The value can 
> vary anywhere between 0 and 999999 metres.
> I would like to make recordgroups like:
> from 0 to 100 m
> from 101 to 500 m
> from 501 to 1000 m
> form 1001 to 10000 m
> and so on.
> I have not yet determined the exact boundaries of the groups (not so 
> important; whatever is possible in bBrowser).
> I would already like to know if I can do it.
>
> The recordgroupkey in bBrowser can be a function like
> cGroupKey := "SubStr(DToS(Server:BIRTHDAY), 1, 3)"
>
> Been struggling to build a function that results in what I want,  no 
> success.
>
> TIA
>
>
> Paul 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

bBRowser recordgroups "Paul D B" <pdb@NOMORESPAMhnt.be> - 2015-02-10 15:23 +0100
  Re: bBRowser recordgroups "Urs Eggmann" <Urs.Eggmann@shinternet.ch> - 2015-02-20 23:10 +0100
    Re: bBRowser recordgroups "Paul D B" <pdb@NOMORESPAMhnt.be> - 2015-03-04 16:40 +0100

csiph-web