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


Groups > comp.lang.clipper.visual-objects > #7735 > unrolled thread

bBRowser recordgroups

Started by"Paul D B" <pdb@NOMORESPAMhnt.be>
First post2015-02-10 15:23 +0100
Last post2015-03-04 16:40 +0100
Articles 3 — 2 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  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

#7735 — bBRowser recordgroups

From"Paul D B" <pdb@NOMORESPAMhnt.be>
Date2015-02-10 15:23 +0100
SubjectbBRowser recordgroups
Message-ID<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 

[toc] | [next] | [standalone]


#7761

From"Urs Eggmann" <Urs.Eggmann@shinternet.ch>
Date2015-02-20 23:10 +0100
Message-ID<ckppnfF7cqpU1@mid.individual.net>
In reply to#7735
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 

[toc] | [prev] | [next] | [standalone]


#7825

From"Paul D B" <pdb@NOMORESPAMhnt.be>
Date2015-03-04 16:40 +0100
Message-ID<md78ve$idn$1@dont-email.me>
In reply to#7761
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 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web