Page 1 of 1

Combine xBrowse columns

Posted: Sat Jun 25, 2022 11:02 am
by Natter
Hi,

Is it possible to combine xBrowse columns only for specific rows ?

Re: Combine xBrowse columns

Posted: Sat Jun 25, 2022 3:33 pm
by nageswaragunupudi
Please try fwh\samples\xbruser.prg.

Image

Re: Combine xBrowse columns

Posted: Sat Jun 25, 2022 6:42 pm
by Natter
Thanks! I completely forgot about this example :(

Re: Combine xBrowse columns

Posted: Mon Jun 27, 2022 4:52 am
by nageswaragunupudi
This is much simpler:

Please try \fwh\samples\xbcelmrg.prg

Image

Re: Combine xBrowse columns

Posted: Wed Jun 29, 2022 12:03 pm
by damianodec
xbcelmrg.prg?
from which version?

In 17.09 there is not

Re: Combine xBrowse columns

Posted: Wed Jun 29, 2022 12:26 pm
by nageswaragunupudi
version FWH2007 onwards

Re: Combine xBrowse columns

Posted: Wed Jun 29, 2022 12:48 pm
by Natter
xcelmg.prg is a good example! However, the bExtand code block assumes gluing columns starting from the first one.
How do I glue, for example, only 2 and 3 columns ?
Is it possible not to show column separators in one line ?

Re: Combine xBrowse columns

Posted: Wed Jun 29, 2022 1:01 pm
by nageswaragunupudi

Code: Select all | Expand


oBrw:aCols[ 2 ]:bExtend := { If( <cond>, 1, 0 ) }
 


For any column, number of columns returned by bExtend, to the right of the current column are merged with the current column

If aCols[ 3 ]:bMerge returns 3, then columns 3,4,5,6 are merged. ( col 3 to col 3+3 )
If aCols[ 2 ]:bMerge returns 1. columns 2 and 3 are merged ( col 2 to col 2+1 )

Re: Combine xBrowse columns

Posted: Wed Jun 29, 2022 1:34 pm
by Natter
Yes, I understand. Thanks !