FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour merge cells
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
merge cells
Posted: Sun Mar 12, 2017 02:34 PM

XBrowser is an array.

{ {"AA", "BB"}, ;
{"AA", "BB"}, ;
{date(), date()-1}, ;
{date(), date()-2}, ;
{"CC", "DD"}, ;
{"CC", "DD"} }

The first column should be merged vertically. Is it possible to specify that you need to merge only cells of the array with the text type ?

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: merge cells
Posted: Sun Mar 12, 2017 04:44 PM

You can if you have the latest version of FWH, using oCol:bMergeValue.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: merge cells
Posted: Sun Mar 12, 2017 04:51 PM

I'm using version 17.01 How to use bMergeValue in this case ?

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: merge cells
Posted: Sun Mar 12, 2017 05:04 PM
Code (fw): Select all Collapse
      :aCols[ 1 ]:lMergeVert     := .t.
      :aCols[ 1 ]:bMergeValue    := { || If( ValType( oBrw:aRow[ 1 ] ) == 'C', oBrw:aRow[ 1 ], Str( oBrw:KeyNo ) ) }
Regards



G. N. Rao.

Hyderabad, India
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: merge cells
Posted: Sun Mar 12, 2017 05:16 PM

Tried, but got error comparison string value and date

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: merge cells
Posted: Sun Mar 12, 2017 05:19 PM
Natter wrote:Tried, but got error comparison string value and date

If you tried my exact code you will not get the error.
You might have changed my code.

Please note: I never post here any code without first testing, so you can safely trust the code I post in the forums.
Regards



G. N. Rao.

Hyderabad, India
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: merge cells
Posted: Sun Mar 12, 2017 05:34 PM

Excuse me mr.Rao. I wasn't paying attention. Everything works !

Continue the discussion