From: Geoff Chambers on
Has someone worked out a routine that if a columns value is repeated
that it won't display? I have columns that displays like so:

Source Description <more columns>
------------ ---------------------------
Labor Bricklayer
Labor Carpenter
Equipment Saw
Equipment Break
Material Mortar
Subcontractor ABC Co.

I would like it to display like this

Source Description <more columns>
------------ ---------------------------
Labor Bricklayer
Carpenter
Equipment Saw
Break
Material Mortar
Subcontractor ABC Co.
From: Geoff Schaller on
Geoff,

Is this an array or a regular table?

If it is a regular table then you are going to need to make it an
expression column that checks the previous OrderKeyNo() rows for the
same value. That would be for DBF.

This will be vastly easier in SQL because you could construct the SQL
query to insert null values almost instantaneously. In DBF this will be
quite slow.

If it is an array then you just build the array accordingly in its
create loop.

Geoff



"Geoff Chambers" <gchambers02(a)msn.com> wrote in message
news:b851c287-78a5-4452-8640-0717b78142a6(a)q23g2000vba.googlegroups.com:

> Has someone worked out a routine that if a columns value is repeated
> that it won't display? I have columns that displays like so:
>
> Source Description <more columns>
> ------------ ---------------------------
> Labor Bricklayer
> Labor Carpenter
> Equipment Saw
> Equipment Break
> Material Mortar
> Subcontractor ABC Co.
>
> I would like it to display like this
>
> Source Description <more columns>
> ------------ ---------------------------
> Labor Bricklayer
> Carpenter
> Equipment Saw
> Break
> Material Mortar
> Subcontractor ABC Co.

From: Geoff Chambers on
It is an array, so I'll tr your suggestion

On May 23, 6:35 pm, "Geoff Schaller"
<geo...(a)softxwareobjectives.com.au> wrote:
> Geoff,
>
> Is this an array or a regular table?
>
> If it is a regular table then you are going to need to make it an
> expression column that checks the previous OrderKeyNo() rows for the
> same value. That would be for DBF.
>
> This will be vastly easier in SQL because you could construct the SQL
> query to insert null values almost instantaneously. In DBF this will be
> quite slow.
>
> If it is an array then you just build the array accordingly in its
> create loop.
>
> Geoff
>
> "Geoff Chambers" <gchamber...(a)msn.com> wrote in message
>
> news:b851c287-78a5-4452-8640-0717b78142a6(a)q23g2000vba.googlegroups.com:
>
>
>
> > Has someone worked out a routine that if a columns value is repeated
> > that it won't display? I have columns that displays like so:
>
> > Source          Description   <more columns>
> > ------------         ---------------------------
> > Labor              Bricklayer
> > Labor              Carpenter
> > Equipment       Saw
> > Equipment       Break
> > Material           Mortar
> > Subcontractor  ABC Co.
>
> > I would like it to display like this
>
> > Source          Description   <more columns>
> > ------------         ---------------------------
> > Labor              Bricklayer
> >                       Carpenter
> > Equipment       Saw
> >                        Break
> > Material           Mortar
> > Subcontractor  ABC Co.- Hide quoted text -
>
> - Show quoted text -

From: richard.townsendrose on
Geoff

this is coming in Ver 4 of bbrowser.

in the mean while construct a method and call it from bbrowser column
instantiation.

oCol:=bDataColumn{SELF:oDCbrGroups,SELF:oAD,{|oSvr, oWin|
oWin:GetInfo(oSvr:FIELDGET(#ASSETREF))}, #Expression, SELF}

you will need to store the previous value in a static
method getinfo(cValue) clss mywin
static local clastvalue:='' as string [or whatever]
local cans:='' as string

if ! clastvalue == cvalue
cans:=cvalue
endif

clastvalue == cValue

return cans

its that simple and will be as fast as just sticking the field in

richard
From: Geoff Schaller on
Richard,

Shame on you! Don't use a static value, just use an ivar of the server
class, browser class or the window class. Statics are evil <g>.

Geoff


"richard.townsendrose" <richard.townsendrose(a)googlemail.com> wrote in
message
news:5dc33714-af1b-4d38-ae1b-681382042016(a)q33g2000vbt.googlegroups.com:

> Geoff
>
> this is coming in Ver 4 of bbrowser.
>
> in the mean while construct a method and call it from bbrowser column
> instantiation.
>
> oCol:=bDataColumn{SELF:oDCbrGroups,SELF:oAD,{|oSvr, oWin|
> oWin:GetInfo(oSvr:FIELDGET(#ASSETREF))}, #Expression, SELF}
>
> you will need to store the previous value in a static
> method getinfo(cValue) clss mywin
> static local clastvalue:='' as string [or whatever]
> local cans:='' as string
>
> if ! clastvalue == cvalue
> cans:=cvalue
> endif
>
> clastvalue == cValue
>
> return cans
>
> its that simple and will be as fast as just sticking the field in
>
> richard