
I would like to browse receive the following:

I tried to use oBrw:lMergeVert := .t. ... but how to group the column total as a rule column invoice?
Regards,
Miloš
Milos
[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]


If you want to browse like in the second picture please try
oBrw:Invoice:lMergeVert := .t.
oBrw:Total:lMergeVert := .t.
both.

#include "FiveWin.Ch"
#include "xbrowse.ch"
//----------------------------------------------------------------------------//
REQUEST DBFCDX
//----------------------------------------------------------------------------//
function Main()
local oDlg, oFont, oBrw
CreateTestDBF()
USE TEST
SET ORDER TO TAG INVOICE
GO TOP
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-14
DEFINE DIALOG oDlg SIZE 500,250 PIXEL FONT oFont
@ 10,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg DATASOURCE "TEST" ;
COLUMNS "INVOICE", "INVOICE", "DATEPAY", "PAYMENT" ;
HEADERS "INVOICE", "TOTAL", "DATEPAY", "PAYMENT" ;
CELL LINES NOBORDER
WITH OBJECT oBrw
:nStretchCol := 1
:Invoice:lMergeVert := .t.
WITH OBJECT :Total
:lMergeVert := .t.
:bStrData := { || TRANSFORM( TEST->TOTAL, NumPict( 10, 2 ) ) }
:nDataStrAlign := AL_RIGHT
:nHeadStrAlign := AL_RIGHT
:cSortOrder := ""
END
//
:CreateFromCode()
END
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return (0)
//----------------------------------------------------------------------------//
static function CreateTestDBF()
field INVOICE
if ! File( "TEST.DBF" )
DbCreate( "TEST", { ;
{ "INVOICE", 'C', 3, 0 }, ;
{ "TOTAL", 'N', 10, 2 }, ;
{ "DATEPAY", 'D', 8, 0 }, ;
{ "PAYMENT", 'N', 10, 2 } }, "DBFCDX", .t., "TEST" )
FW_ArrayToDBF( { ;
{ "101", 1000, {^ 2014/05/01 }, 500 }, ;
{ "101", 1000, {^ 2014/05/05 }, 500 }, ;
{ "101", 1000, {^ 2014/05/05 }, 100 }, ;
{ "102", 1000, {^ 2014/05/10 }, 300 }, ;
{ "102", 1000, {^ 2014/05/15 }, 600 }, ;
{ "103", 2000, {^ 2014/05/15 }, 1000 } } )
INDEX ON INVOICE TAG INVOICE
CLOSE DATA
endif
return nil
//----------------------------------------------------------------------------//
init procedure PrgInit
SET DATE GERMAN
SET CENTURY ON
SET DELETED ON
SET EXCLUSIVE OFF
RDDSETDEFAULT( "DBFCDX" )
XbrNumFormat( 'E', .t. )
return
//----------------------------------------------------------------------------//
hi Mr. Rao
about this xBrowse,
I would like one row for each INVOICE and put near to INVOICE NUMBER "+" or "-" bmp to expande or collapse (under the INVOICE NUMBER or
to the right is indifferent) that INVOICE with value details
is it possible?
thank you
That is achieved by Tree browse. Most of the time, we adopt tree browse for similar cases.
In this case, the user wanted this way, so I provided this solution for him.
hi Mr. Rao
I'm trying wbrwtree sample but get rhis error:
Application
===========
Path and name: C:\fwh1709\samples\xbrwtree.exe (32 bits)
Size: 3,488,768 bytes
Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20161218)
FiveWin version: FWHX 17.09
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 12/11/17, 10:40:17
Error description: Error BASE/1004 Class: 'NIL' has no exported method: CARGO
Args:
[ 1] = U
Called from: => CARGO( 0 )
Called from: xbrwtree.prg => MAIN( 19 )
any help?
Please make sure "customer.dbf" is in the same folder.
Please make sure "customer.dbf" is in the same folder.
cd\fwh\samples
buildh xbrwtree
or
buildx xbrwtreehi Mr Rao
my Customer.dbf is empty.
if I try to open it by DBF editor i get INVALID DBF file
if I try to open it by excel (file dBase) it has just COLUMN HEADER
thank you
That is the reason.
If you do a fresh install of FWH you get a full customer.dbf
hi Mr Rao
yes That was the reason!
thank you.