How to: xBrowse Column Span

How to: xBrowse Column Span

Postby compaqt » Thu Dec 06, 2012 5:18 pm

I need to display data in columns in a dbf. However there is a special requirement as displayed below:

Serial Date Customer Amount

Agent: JOSEPH DSOUZA
1 20/11/2012 Gagan Raj 20,000
5 21/11/2012 Gagan Raj 22,030


In the above, the field width of dbf is as follows:

Serial 6 character
Date 10 character
Customer 40 character
Amount 12 character

What I need is that the display of name: Agent: JOSEPH DSOUZA will be splitted in the dbf like below:

Serial Agent: first 6 characters
Date _JOSEPH D next 10 char...
Customer SOUZA remaining characters

The display should come continuous without any break in xBROWSE.

This is faciliated in EXCEL with column SPAN option
Gagan Raj
GTalk: csplsurat@gmail.com
WhatsApp: +91 9879000301
compaqt
 
Posts: 34
Joined: Wed Jun 17, 2009 5:52 pm

Re: How to: xBrowse Column Span

Postby Marc Vanzegbroeck » Thu Dec 06, 2012 5:45 pm

Are all the fields type character?
Is this what you want?

oCol:bStrData := { || alltrim(serial)+' '+alltrim(date)+' '+alltrim(customer)+' '+alltrim(amount)}
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1157
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: How to: xBrowse Column Span

Postby compaqt » Thu Dec 06, 2012 5:47 pm

This will cause only single column to be displayed.

In need to display all the separate columns, but data should be spanned.

If possible, please give your gtalk id to connect to you directly. Mine is: csplsurat@gmail.com
Gagan Raj
GTalk: csplsurat@gmail.com
WhatsApp: +91 9879000301
compaqt
 
Posts: 34
Joined: Wed Jun 17, 2009 5:52 pm

Re: How to: xBrowse Column Span

Postby Marc Vanzegbroeck » Thu Dec 06, 2012 6:05 pm

Is all the data in one field, and you want to dispayed it in 4 columns?

Is this what you need?
Fname is the fieldname of the DBF

Code: Select all  Expand view
oCol:bStrData := { || substr(fname,1,6)}
oCol:bStrData := { || substr(fname,7,10)}
oCol:bStrData := { || substr(fname,17,40)}
oCol:bStrData := { || substr(fname,57,12)}
 
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1157
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: How to: xBrowse Column Span

Postby compaqt » Thu Dec 06, 2012 6:11 pm

Thanks for your support, but still NO.
Consider this example:
aValues := {}
aadd( aValues, { 'Agent: Joseph Dsouza' , '', '', '' } )
aadd( aValues, { '1' , '20/11/2012', 'Gagan Raj', '20,000' } )
aadd( aValues, { '5' , '22/11/2012', 'Gagan Raj', '20,320' } )

Thea above array has 3 sub arrays, with 4 Elements each.
When using xBrowse, the width of each column will be as: 6, 10, 40, 14

Now the real problem: In the first sub-array, the data: 'Agent: J.....' will be displayed truncated as per the coumn width!!
I want that when the next element data in this sub-array is empty, then the first element should be OVERFLOWED / SPANNED to the next column automatically.
Gagan Raj
GTalk: csplsurat@gmail.com
WhatsApp: +91 9879000301
compaqt
 
Posts: 34
Joined: Wed Jun 17, 2009 5:52 pm

Re: How to: xBrowse Column Span

Postby Marc Vanzegbroeck » Thu Dec 06, 2012 7:03 pm

Sorry I cant't help you since I still using an older version of FWH.
I know that there exist a oBrw:field:lMergeVert := .T for vertical merge, but you need a horizontal merge.

Here is the example of the vertical merge.
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=18963&p=99421&hilit=merge#p99421

I think someone with a newer version (or Antonio) can confirm that a that already exist.
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1157
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: How to: xBrowse Column Span

Postby compaqt » Thu Dec 06, 2012 7:12 pm

Exactly.

Anyway, thanks a lot for your attention.
Gagan Raj
GTalk: csplsurat@gmail.com
WhatsApp: +91 9879000301
compaqt
 
Posts: 34
Joined: Wed Jun 17, 2009 5:52 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 38 guests

cron