topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
---|---|
xbrowse drag multiple cells | Hello
I would like to select multiple cells with the cursor, drag them and drop at another location ?
Has anyone done it with xbrowse ? Can you share a sample ?
It is ok for me to drag and drop one cell, i have it working,
Thanks for your help,
Richard |
xbrowse drag multiple cells | Me long expecting too! Maybe xbrowse should add a new data selected rows & cols, different to selected rows only.
Regards!
Shuming Wang |
xbrowse e registros borrados | Olá, xbrowse no pinta correctamente la barra vertical se hay registros borrados. Hay alguma manera sem usar lo ! Deleted() en el indice?Gracias. |
xbrowse e registros borrados | [quote="Wanderson":ui6tkr8q]Olá, xbrowse no pinta correctamente la barra vertical se hay registros borrados. Hay alguma manera sem usar lo ! Deleted() en el indice?
Gracias.[/quote:ui6tkr8q]index on clave tag clave for !deleted() |
xbrowse edit column | Hi,
I have a array xbrowse, how i can turn a cell editable and process a function when finish edit and make total this column?
Thanks in advance. |
xbrowse edit column | Set oCol:nEditType := EDIT_GET. That makes the cell editable.
If you are not using a very old version of FWH, retotalling is automatically done by XBrowse.
When |
xbrowse edit column | [quote="nageswaragunupudi":1m8v0sda]Set oCol:nEditType := EDIT_GET. That makes the cell editable.
If you are not using a very old version of FWH, retotalling is automatically done by XBrowse.
When[/quote:1m8v0sda]
Thanks for the answer but is not column totals, other totals in gets with many expressions. I want to do after edit the cell. |
xbrowse edit column | [code=fw:3kwep7ds]<div class="fw" id="{CB}" style="font-family: monospace;">oCol:<span style="color: #000000;">bOnChange</span> := <span style="color: #000000;">{</span> |oCol, uOldValue| yourfunction<span style="color: #000000;">(</span> oCol, uOldValue <span style="color: #000000;">)</span> <span style="color: #000000;">}</span></div>[/code:3kwep7ds] |
xbrowse edit column | [quote="nageswaragunupudi":1k5j0jtd][code=fw:1k5j0jtd]<div class="fw" id="{CB}" style="font-family: monospace;">oCol:<span style="color: #000000;">bOnChange</span> := <span style="color: #000000;">{</span> |oCol, uOldValue| yourfunction<span style="color: #000000;">(</span> oCol, uOldValue <span style="color: #000000;">)</span> <span style="color: #000000;">}</span></div>[/code:1k5j0jtd][/quote:1k5j0jtd]
Thank you! Works great! |
xbrowse edit columns | Can not edit a column of a one row of xbrowse ?
I explain you
I have this xbrowse
[img:2vwgch1v]https://s9.postimg.cc/jj80u0adb/image.jpg[/img:2vwgch1v]
I wish edit only for the first row only the columns I draw on green box
it's possible ? |
xbrowse edit columns | See oCol:nEditType := any value > 0 like EDIT_GET, EDIT_BUTTON, etc for the columns you want to edit.
Retain oCol:nEditType := 0 for other columns.
What else am I missing? |
xbrowse edit columns | Sorry perhaps I not explain good
Look the picture please
for the [b:1fv4ko86]first record[/b:1fv4ko86] I wish edit only the columns 8 and 9 ( dates) and this record must not deleted
from second record to all records I wish edit only the column 4 and 5 , 8 and 9 ( and can be deleted)
thanks |
xbrowse edit columns | For columns 4,5,8 and 9, set nEditType := EDIT_GET or EDIT_BUTTON or etc.
For columns 8 and 9 also add
[code=fw:el5275gs]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oCol:<span style="color: #000000;">bEditWhen</span> := <span style="color: #000000;">{</span> || oBrw:<span style="color: #000000;">BookMark</span> == <span style="color: #000000;">1</span> <span style="color: #000000;">}</span><br /> </div>[/code:el5275gs]
Deletion has to be handled in the program code. |
xbrowse edit columns | WITH OBJECT oBrw:aCols[ 5]
:AddBmpFile(".\bitmaps\sh_plus.bmp")
:nBtnBmp := 1
:nwidth := 60
:nDataStrAlign := AL_CENTER
:nHeadStrAlign := AL_CENTER
:nEditType := EDIT_BUTTON
:bEditBlock := { ||RES->QUANTITY++ }
:lBtnTransparent := .t.
[b:39btt9cw] :bEditWhen := { || oBrw:BookMark == 1 }[/b:39btt9cw]
END
not run it add the quantity also the record number 1
I think ed something of
:bEditWhen := { ||oBrw:aArrayData:nat<>1 }
where 1 is the first record
If you see the picture I wish the final user can edit only date for the first line of xbrowse
I wish also the final user cannot delete the first line |
xbrowse edit columns | I tried also with
:nEditType := EDIT_BUTTON
:bEditBlock := { |o|Msginfo("") }
:bEditWhen := { || oBrw:nArrayAt<>1 }
I wish when on first line of the browse thefinal user cannot edit the cell
the user can edit only from second line |
xbrowse edit columns | Please try
:bEditWhen := { || oBrw:KeyNo == 1 } |
xbrowse edit columns | This is possible in 18.04:
[url=https://imageshack.com/i/pm8xqYCDp:3uwvn6ju][img:3uwvn6ju]https://imagizer.imageshack.com/v2/xq90/922/8xqYCD.png[/img:3uwvn6ju][/url:3uwvn6ju]
For Gets also. |
xbrowse edit columns | [quote="nageswaragunupudi":1n7w8la6]This is possible in 18.04:
[url=https://imageshack.com/i/pm8xqYCDp:1n7w8la6][img:1n7w8la6]https://imagizer.imageshack.com/v2/xq90/922/8xqYCD.png[/img:1n7w8la6][/url:1n7w8la6]
For Gets also.[/quote:1n7w8la6]
[size=200:1n7w8la6]GOOD[/size:1n7w8la6]
[size=200:1n7w8la6]RAO YOU'RE FANTASTIC[/size:1n7w8la6]
tha value must be on center! |
xbrowse edit columns | Rao
:bEditWhen := { || oBrw:KeyNo == 1 }
I tried also with
:bEditWhen := { || oBrw:KeyNo <>1 }
it continue to process the editblock on first line |
xbrowse edit columns | Rao if you try this test
[code=fw:n6tj41b6]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, oBrw<br /><br /> USE c:\work\FWH\SAMPLES\CUSTOMER <br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">700</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL<br /> @ <span style="color: #000000;">20</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-20</span>,<span style="color: #000000;">-20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg DATASOURCE <span style="color: #0000ff;">Alias</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">AUTOCOLS</span> CELL LINES NOBORDER<br /><br /> WITH OBJECT oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span><br /> :<span style="color: #000000;">nEditType</span> := EDIT_BUTTON<br /> :<span style="color: #000000;">AddResource</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"OPEN"</span> <span style="color: #000000;">)</span><br /> :<span style="color: #000000;">nBtnBmp</span> := <span style="color: #000000;">1</span><br /> :<span style="color: #000000;">bEditBlock</span> := <span style="color: #000000;">{</span> || test<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">}</span><br /> :<span style="color: #000000;">beditwhen</span> := <span style="color: #000000;">{</span> || oBrw:<span style="color: #000000;">keyno</span> <> <span style="color: #000000;">1</span> <span style="color: #000000;">}</span><br /> END<br /> oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">Function</span> test<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">return</span> <span style="color: #ff0000;">"modified"</span></div>[/code:n6tj41b6]
it modified the record inserting "modified"
I wish no modify the first record How I can resolve ?
[b:n6tj41b6]beditwhen[/b:n6tj41b6] must make as this function
Function test(oBrw)
IF oBrw:keyno =1
Msginfo(" I cannot mofified")
else
return "modified"
endif
return nil
but it not run ok
Now I correct with
:bEditBlock := { ||IF(oBrw:KeyNo=1,,RES->QUANTITY++) }
but I cannot use bwhenedit codeblock |
xbrowse edit columns | Now with these lines seem run ok
[code=fw:23yhndch]<div class="fw" id="{CB}" style="font-family: monospace;"> WITH OBJECT oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">4</span><span style="color: #000000;">]</span><br /> :<span style="color: #000000;">AddBmpFile</span><span style="color: #000000;">(</span><span style="color: #ff0000;">".<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\s</span>h_minus.bmp"</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">nBtnBmp</span> := <span style="color: #000000;">1</span><br /> :<span style="color: #000000;">nwidth</span> := <span style="color: #000000;">40</span><br /> :<span style="color: #000000;">nEditType</span> := EDIT_BUTTON<br /> :<span style="color: #000000;">bEditBlock</span> := <span style="color: #000000;">{</span> ||IF<span style="color: #000000;">(</span>oBrw:<span style="color: #000000;">KeyNo</span>=<span style="color: #000000;">1</span>,,IIF<span style="color: #000000;">(</span>RES->QUANTITY><span style="color: #000000;">1</span>, RES->QUANTITY--,RES->QUANTITY:= <span style="color: #000000;">1</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">lBtnTransparent</span> := .t.<br /> :<span style="color: #000000;">lBmpStretch</span> := .t.<br /> :<span style="color: #000000;">nDataStrAlign</span> := AL_CENTER<br /> :<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br /> END<br /><br /><br /> WITH OBJECT oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">5</span><span style="color: #000000;">]</span><br /> :<span style="color: #000000;">AddBmpFile</span><span style="color: #000000;">(</span><span style="color: #ff0000;">".<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\s</span>h_plus.bmp"</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">nBtnBmp</span> := <span style="color: #000000;">1</span><br /> :<span style="color: #000000;">nwidth</span> := <span style="color: #000000;">60</span><br /> :<span style="color: #000000;">nDataStrAlign</span> := AL_CENTER<br /> :<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br /> :<span style="color: #000000;">nEditType</span> := EDIT_BUTTON<br /> :<span style="color: #000000;">bEditBlock</span> := <span style="color: #000000;">{</span> ||IF<span style="color: #000000;">(</span>oBrw:<span style="color: #000000;">KeyNo</span>=<span style="color: #000000;">1</span>,,RES->QUANTITY++<span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">lBtnTransparent</span> := .t.<br /> END</div>[/code:23yhndch]
is there a bug on bwhenedit codeblock ? |
xbrowse edit columns | [quote:47mkkfzn]is there a bug on bwhenedit codeblock ?
[/quote:47mkkfzn]
You are right.
bEditWhen is not preventing button action of EDIT_BUTTON.
This is now fixed in 18.04. |
xbrowse edit columns | thanks |
xbrowse edit columns | Saludos estoy necesitando poner un button en el xbrowse que me lleve a una consulta de movimientos del documento seleccionado todo funciona bien le he puesto una imagen al button pero cuando abandono la aplicación se me cuelga comento ese configuracion de la columna y termina normal.
/*
WITH OBJECT aBrw:aCols[ 1 ]
:addbmpfile( op:bmp16+"eye.bmp" )
:nBtnBmp := 1
:nEditType := EDIT_BUTTON
:bEditBlock := {|| VerItems( cCodigo,cQry:tipo,cQry:ord_comp )}
:lBtnTransparent := .t.
:lBmpStretch := .t.
END
*/
he tenido que solucionarlo usando
:aCols[01]:bLDClickData := { || VerItems( cCodigo,cQry:tipo,cQry:ord_comp ) }
version de FWH 1801 hay alguna razon ?? |
xbrowse edit columns | Friends, how to do this with 2 buttons + -
REGARDS |
xbrowse edit columns | hello |
xbrowse edit columns | please search Rao's sample test
from 18.04:
[code=fw:zurte0da]<div class="fw" id="{CB}" style="font-family: monospace;"> <br />WITH OBJECT oBrowse:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">4</span><span style="color: #000000;">]</span><br /> :<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">100</span><br /> :<span style="color: #000000;">nDataStrAlign</span> := AL_CENTER<br /> :<span style="color: #000000;">AddBitmap</span><span style="color: #000000;">(</span> <span style="color: #000000;">{</span> FW_BmpPlus<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, FW_BmpMinus<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// Right Button</span><br /> :<span style="color: #000000;">nEditType</span> := EDIT_BUTTON<br /> :<span style="color: #000000;">bEditBlock</span> := <span style="color: #000000;">{</span> |r,c,oCol|IIF<span style="color: #000000;">(</span>!oBrowse:<span style="color: #000000;">nArrayAt</span> = <span style="color: #000000;">1</span>, oCol:<span style="color: #000000;">Value</span> + <span style="color: #000000;">1</span>,<span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">nBtnBmp</span> := <span style="color: #000000;">1</span><br /> :<span style="color: #000000;">lBtnTransparent</span> := .t.<br /><br /> <span style="color: #B900B9;">// Left Button</span><br /> :<span style="color: #000000;">bBmpData</span> := <span style="color: #000000;">{</span> |v,lSel| <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> lSel, <span style="color: #000000;">2</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bBmpAction</span> := <span style="color: #000000;">{</span> |oCol| IIF<span style="color: #000000;">(</span>!oBrowse:<span style="color: #000000;">nArrayAt</span> = <span style="color: #000000;">1</span>,IIF<span style="color: #000000;">(</span> oCol:<span style="color: #000000;">Value</span>><span style="color: #000000;">0</span>,oCol:<span style="color: #000000;">VarPut</span><span style="color: #000000;">(</span> oCol:<span style="color: #000000;">Value</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>,<span style="color: #000000;">)</span>,<span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bOnChange</span> := bCalcRow<br /> :<span style="color: #000000;">lBmpTransparent</span> := .T.<br /> END</div>[/code:zurte0da] |
xbrowse edit dbcombo | Hello,
I am trying to get a dbcombo functional in this xbrowse sample by Mr. Nages
The oRec:drvr displays fine ,but without any functional dbcombo.
Don't know if I've chosen the proper form of dbcombo or have the syntax correct.
Any help appreciated.
Bruce
[code=fw:2v732in1]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">Local</span> oTruc, oBrw, oDlg, oRec<br /><br /> <span style="color: #B900B9;">// path_seg defined static above </span><br /> <br /> oTruc := TDataBase<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> oTruc := TDataBase<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> , cPath_seg + <span style="color: #ff0000;">'TRUC'</span> <span style="color: #000000;">)</span><br /><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">25</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">35</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">" Tdatabase Test"</span><br /> <br /> @ <span style="color: #000000;">12</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-10</span>,<span style="color: #000000;">-30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> FIELDS oTruc:<span style="color: #000000;">TAG</span> , oTruc:<span style="color: #000000;">Que_dte</span>, oTruc:<span style="color: #000000;">Shp_dte</span>, oTruc:<span style="color: #000000;">org</span> , oTruc:<span style="color: #000000;">DrpA</span> ,;<br /> oTruc:<span style="color: #000000;">DrpB</span> , oTruc:<span style="color: #000000;">DrpC</span> , oTruc:<span style="color: #000000;">Drvr</span> , oTruc:<span style="color: #000000;">Qty1</span> , oTruc:<span style="color: #000000;">Desc1</span>,;<br /> oTruc:<span style="color: #000000;">Qty2</span> , oTruc:<span style="color: #000000;">Desc2</span> , oTruc:<span style="color: #000000;">Trip_num</span>,oTruc:<span style="color: #000000;">Notes</span> ; <br /> HEADERS <span style="color: #ff0000;">"Tag"</span>,<span style="color: #ff0000;">"Que Date"</span>,<span style="color: #ff0000;">"Ship Date"</span>, <span style="color: #ff0000;">"Orgin"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"B"</span>, <span style="color: #ff0000;">"C"</span>, <span style="color: #ff0000;">"DR"</span>,;<br /> <span style="color: #ff0000;">"Qty1"</span>,<span style="color: #ff0000;">"Desc1"</span>,<span style="color: #ff0000;">"Qty2"</span>,<span style="color: #ff0000;">"Desc2"</span>, <span style="color: #ff0000;">"Trip #"</span>, <span style="color: #ff0000;">"Notes"</span> ; <br /> FIELDSIZES <span style="color: #000000;">30</span> , <span style="color: #000000;">60</span> , <span style="color: #000000;">60</span> , <span style="color: #000000;">45</span>, <span style="color: #000000;">45</span>, <span style="color: #000000;">45</span>, <span style="color: #000000;">45</span>, <span style="color: #000000;">40</span>,;<br /> <span style="color: #000000;">30</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">45</span>, <span style="color: #000000;">160</span> ;<br /> OBJECT oTruc ;<br /> AUTOSORT ;<br /> CELL LINES NOBORDER <br /> <br /> WITH OBJECT oBrw<br /> :<span style="color: #000000;">bEdit</span> := <span style="color: #000000;">{</span> |oRec| CustEditDlg<span style="color: #000000;">(</span> oRec <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #B900B9;">// reconfigures edit() </span><br /> :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// seems to need this to make xbrowse display</span><br /> END<br /> <br /> @ <span style="color: #000000;">170</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Add"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>,<span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oRec := TDataRow<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oTruc, <span style="color: #00C800;">nil</span>, .t. <span style="color: #000000;">)</span>, oRec:<span style="color: #00C800;">Edit</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <br /> @ <span style="color: #000000;">170</span>,<span style="color: #000000;">60</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Edit"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>,<span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oRec := TDataRow<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oTruc <span style="color: #000000;">)</span>, oRec:<span style="color: #00C800;">Edit</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /> <br /> oTruc:<span style="color: #000000;">close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//---------------------------------------//</span><br /><span style="color: #B900B9;">// downloaded 02/09/15 FW</span><br /><span style="color: #B900B9;">// 09/08/13 cust edit dialog nages - Xbrow, add, edit, modify, delete</span><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> CustEditDlg<span style="color: #000000;">(</span> oRec <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, oFont, oGrp<br /> <span style="color: #00C800;">local</span> oDrv, oDbc2 <br /> <br /> oDrv := TDataBase<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oDrv := TDataBase<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> , cPath_seg + <span style="color: #ff0000;">'T_drv'</span> <span style="color: #000000;">)</span><br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">618</span>,<span style="color: #000000;">382</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"EDIT MILL"</span><br /><br /> @ <span style="color: #000000;">0</span>, <span style="color: #000000;">4</span> GROUP oGrp <span style="color: #0000ff;">TO</span> <span style="color: #000000;">168</span>, <span style="color: #000000;">305</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span><br /><br /> @ <span style="color: #000000;">12</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Tag:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">15</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br /> @ <span style="color: #000000;">10</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Tag</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">105</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br /> @ <span style="color: #000000;">26</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Que Dte:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">15</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br /> @ <span style="color: #000000;">24</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Que_dte</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">105</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br /> @ <span style="color: #000000;">40</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Shp_dte:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">21</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br /> @ <span style="color: #000000;">38</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">shp_dte</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">155</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br /> @ <span style="color: #000000;">54</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Org:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">13</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br /> @ <span style="color: #000000;">52</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">org</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">155</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br /> @ <span style="color: #000000;">68</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Drp A:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">19</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br /> @ <span style="color: #000000;">66</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">DrpA</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">15</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br /> @ <span style="color: #000000;">82</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Drp B:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">12</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br /> @ <span style="color: #000000;">80</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">DrpB</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">55</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br /> @ <span style="color: #000000;">96</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Drp C:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">29</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br /> @ <span style="color: #000000;">94</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">DrpC</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">44</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br /> @ <span style="color: #000000;">124</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Drvr:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">15</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br /> <span style="color: #B900B9;">//@ 122, 44 GET oRec:Drvr OF oDlg SIZE 12, 12 PIXEL UPDATE PICTURE "99"</span><br /> @ <span style="color: #000000;">146</span>, <span style="color: #000000;">40</span> dbcombo oDBC2 <span style="color: #0000ff;">var</span> oRec:<span style="color: #000000;">Drvr</span> <span style="color: #0000ff;">of</span> oDlg;<br /> <span style="color: #0000ff;">alias</span> oDrv:<span style="color: #000000;">cAlias</span>;<br /> <span style="color: #0000ff;">size</span> <span style="color: #000000;">75</span>,<span style="color: #000000;">250</span> <span style="color: #0000ff;">pixel</span>;<br /> itemfield <span style="color: #ff0000;">"DRVR"</span> ;<br /> listfield <span style="color: #ff0000;">"TNAME"</span>;<br /> <span style="color: #0000ff;">update</span> <br /> @ <span style="color: #000000;">138</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Qty 1:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">21</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br /> @ <span style="color: #000000;">136</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Qty1</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"999999.99"</span><br /> @ <span style="color: #000000;">152</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Desc 1:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">21</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br /> @ <span style="color: #000000;">150</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Desc1</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br /> @ <span style="color: #000000;">172</span>, <span style="color: #000000;">175</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Undo"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">42</span>, <span style="color: #000000;">14</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">WHEN</span> oRec:<span style="color: #000000;">Modified</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oRec:<span style="color: #000000;">UnDo</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> @ <span style="color: #000000;">172</span>, <span style="color: #000000;">219</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Save"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">42</span>, <span style="color: #000000;">14</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">WHEN</span> oRec:<span style="color: #000000;">Modified</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oRec:<span style="color: #000000;">Save</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> @ <span style="color: #000000;">172</span>, <span style="color: #000000;">263</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Close"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">42</span>, <span style="color: #000000;">14</span> <span style="color: #0000ff;">PIXEL</span> CANCEL <span style="color: #0000ff;">ACTION</span> ;<br /> <span style="color: #000000;">(</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oRec:<span style="color: #000000;">Modified</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> .and. MsgYesNo<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Save Changes ?"</span> <span style="color: #000000;">)</span>, oRec:<span style="color: #000000;">Save</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">)</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> AEval<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">aControls</span>, <span style="color: #000000;">{</span> |o| <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> o:<span style="color: #000000;">ClassName</span> == <span style="color: #ff0000;">"TGET"</span>, o:<span style="color: #000000;">bValid</span> := <span style="color: #000000;">{</span> || oDlg:<span style="color: #000000;">AEvalWhen</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .t. <span style="color: #000000;">}</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /> <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br /> oDrv:<span style="color: #000000;">close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:2v732in1] |
xbrowse edit dbcombo | Please indicate version of FWH you are using |
xbrowse edit dbcombo | 1) Please substitute this
[code=fw:6ymsvaci]<div class="fw" id="{CB}" style="font-family: monospace;"> FIELDS oTruc:<span style="color: #000000;">TAG</span> , oTruc:<span style="color: #000000;">Que_dte</span>, oTruc:<span style="color: #000000;">Shp_dte</span>, oTruc:<span style="color: #000000;">org</span> , oTruc:<span style="color: #000000;">DrpA</span> ,;<br /> oTruc:<span style="color: #000000;">DrpB</span> , oTruc:<span style="color: #000000;">DrpC</span> , oTruc:<span style="color: #000000;">Drvr</span> , oTruc:<span style="color: #000000;">Qty1</span> , oTruc:<span style="color: #000000;">Desc1</span>,;<br /> oTruc:<span style="color: #000000;">Qty2</span> , oTruc:<span style="color: #000000;">Desc2</span> , oTruc:<span style="color: #000000;">Trip_num</span>,oTruc:<span style="color: #000000;">Notes</span> ; <br /> </div>[/code:6ymsvaci]
with
[code=fw:6ymsvaci]<div class="fw" id="{CB}" style="font-family: monospace;"> COLUMNS <span style="color: #ff0000;">"TAG"</span>, <span style="color: #ff0000;">"Que_dte"</span>, <span style="color: #ff0000;">"Shp_dte"</span>, <span style="color: #ff0000;">"org"</span>, <span style="color: #ff0000;">"DrpA"</span>, <span style="color: #ff0000;">"DrpB"</span>, <span style="color: #ff0000;">"DrpC"</span>, <span style="color: #ff0000;">"Drvr"</span>, <span style="color: #ff0000;">"Qty1"</span>, <span style="color: #ff0000;">"Desc1"</span>, ;<br /> <span style="color: #ff0000;">"Qty2"</span>, <span style="color: #ff0000;">"Desc2"</span>, <span style="color: #ff0000;">"Trip_num"</span>,<span style="color: #ff0000;">"Notes"</span> ; <br /> </div>[/code:6ymsvaci]
and try.
2) Please never use FIELDS clause. Please use COLUMNS clause only always.
Please let me know if you still have problems. |
xbrowse edit dbcombo | FWH 14.11
Harbour 3.2.0dev ( r1406271520 )
bcc582
Bruce |
xbrowse edit dbcombo | Mr. Nages,
I made the changes as suggested ( fields to columns ), but that hasn't had any effect on the dbcombo displaying properly in the CustEditDlg function.
Bruce |
xbrowse edit dbcombo | I shall prepare and post a very similar sample for you. Please wait |
xbrowse edit dbcombo | I do not have your DBFs. But customer.dbf and states.dbf in \fwh\samples folder are very similar to your example
I prepared the sample using these two DBFs. If your FWH installation path is different, please change the path in the program
[code=fw:1v66xov4]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br />REQUEST DBFCDX<br /><br /><span style="color: #00C800;">function</span> XbrAddEdit<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oCust, oStates<br /> <span style="color: #00C800;">local</span> aStates<br /> <span style="color: #00C800;">local</span> oWnd, oBar, oBrw, oFont<br /><br /><br /> RddSetDefault<span style="color: #000000;">(</span> <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">)</span><br /> SET DELETED <span style="color: #0000ff;">ON</span><br /><br /> oStates := TDataBase<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> <span style="color: #00C800;">nil</span>, <span style="color: #ff0000;">"c:<span style="color: #000000;">\\</span>fwh<span style="color: #000000;">\\</span>samples<span style="color: #000000;">\\</span>states.dbf"</span> <span style="color: #000000;">)</span><br /> aStates := <span style="color: #000000;">(</span> oStates:<span style="color: #000000;">nArea</span> <span style="color: #000000;">)</span>-><span style="color: #000000;">(</span> FW_DbfToArray<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> oStates:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oCust := TDataBase<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> <span style="color: #00C800;">nil</span>, <span style="color: #ff0000;">"c:<span style="color: #000000;">\\</span>fwh<span style="color: #000000;">\\</span>samples<span style="color: #000000;">\\</span>customer.dbf"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-12</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /> oWnd:<span style="color: #000000;">SetFont</span><span style="color: #000000;">(</span> oFont <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">90</span>,<span style="color: #000000;">32</span> <span style="color: #000000;">2007</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Add"</span> <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">EditSource</span><span style="color: #000000;">(</span> .t. <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Edit"</span> <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">EditSource</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Delete"</span> <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">Delete</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd DATASOURCE oCust ;<br /> COLUMNS <span style="color: #ff0000;">"FIRST"</span>,<span style="color: #ff0000;">"LAST"</span>,<span style="color: #ff0000;">"STREET"</span>,<span style="color: #ff0000;">"CITY"</span>,<span style="color: #ff0000;">"STATE"</span>,<span style="color: #ff0000;">"ZIP"</span>,<span style="color: #ff0000;">"HIREDATE"</span>,<span style="color: #ff0000;">"MARRIED"</span>,<span style="color: #ff0000;">"AGE"</span>,<span style="color: #ff0000;">"SALARY"</span>,<span style="color: #ff0000;">"NOTES"</span> ;<br /> CELL LINES NOBORDER<br /><br /> WITH OBJECT oBrw<br /> :<span style="color: #000000;">SetChecks</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">nEditTypes</span> := EDIT_GET<br /> :<span style="color: #000000;">bEdit</span> := <span style="color: #000000;">{</span> |oRec| EditDlg<span style="color: #000000;">(</span> oRec <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> WITH OBJECT oBrw:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"STATE"</span> <span style="color: #000000;">)</span><br /> :<span style="color: #000000;">nEditType</span> := EDIT_LISTBOX<br /> :<span style="color: #000000;">aEditListTxt</span> := aStates<br /> END<br /> :<span style="color: #000000;">brclicked</span> := <span style="color: #000000;">{</span> || EditDlg<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> <span style="color: #B900B9;">//</span><br /> :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> END<br /><br /> oWnd:<span style="color: #000000;">oClient</span> := oBrw<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span><br /> <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /> oCust:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> EditDlg<span style="color: #000000;">(</span> oRec <span style="color: #000000;">)</span><br /><br /><br /> <span style="color: #00C800;">local</span> oDlg, oGrp, oBtn, oStates<br /> <span style="color: #00C800;">local</span> lSave := .f.<br /><br /> oStates := TDataBase<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> , <span style="color: #ff0000;">"STATES"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">820</span>,<span style="color: #000000;">380</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oRec:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">oFont</span> ;<br /> <span style="color: #0000ff;">TITLE</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oRec:<span style="color: #000000;">RecNo</span> == <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"ADD "</span>, <span style="color: #ff0000;">"EDIT "</span> <span style="color: #000000;">)</span> + <span style="color: #ff0000;">"CUSTOMER"</span><br /><br /> @ <span style="color: #000000;">0</span>, <span style="color: #000000;">4</span> GROUP oGrp <span style="color: #0000ff;">TO</span> <span style="color: #000000;">168</span>, <span style="color: #000000;">405</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span><br /><br /><br /> @ <span style="color: #000000;">12</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"First:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">15</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br /> @ <span style="color: #000000;">10</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">First</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">105</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br /><br /> @ <span style="color: #000000;">26</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Last:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">15</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br /> @ <span style="color: #000000;">24</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Last</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">105</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br /><br /> @ <span style="color: #000000;">40</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Street:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">21</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br /> @ <span style="color: #000000;">38</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Street</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">155</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br /><br /> @ <span style="color: #000000;">54</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"City:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">13</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br /> @ <span style="color: #000000;">52</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">City</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">155</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br /><br /> @ <span style="color: #000000;">68</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"State:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">19</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br /> @ <span style="color: #000000;">66</span>, <span style="color: #000000;">44</span> DBCOMBO oRec:<span style="color: #000000;">State</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">100</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">ALIAS</span> oStates:<span style="color: #000000;">cAlias</span> ITEMFIELD <span style="color: #ff0000;">"CODE"</span> LISTFIELD <span style="color: #ff0000;">"NAME"</span><br /><br /> @ <span style="color: #000000;">82</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Zip:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">12</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br /> @ <span style="color: #000000;">80</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Zip</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">55</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br /><br /> @ <span style="color: #000000;">96</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Hiredate:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">29</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br /> @ <span style="color: #000000;">94</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Hiredate</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">44</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span><br /><br /> @ <span style="color: #000000;">108</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">CHECKBOX</span> oRec:<span style="color: #000000;">Married</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Married:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">43</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br /><br /> @ <span style="color: #000000;">124</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Age:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">15</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br /> @ <span style="color: #000000;">122</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Age</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">12</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"99"</span><br /><br /> @ <span style="color: #000000;">138</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Salary:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">21</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br /> @ <span style="color: #000000;">136</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Salary</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"999,999.99"</span> <span style="color: #0000ff;">UPDATE</span><br /><br /> @ <span style="color: #000000;">152</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Notes:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">21</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">PIXEL</span><br /> @ <span style="color: #000000;">150</span>, <span style="color: #000000;">44</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Notes</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">355</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span><br /><br /> @ <span style="color: #000000;">172</span>, <span style="color: #000000;">275</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Undo"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">42</span>, <span style="color: #000000;">14</span> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">WHEN</span> oRec:<span style="color: #000000;">Modified</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oRec:<span style="color: #000000;">Undo</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">172</span>, <span style="color: #000000;">319</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Save"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">42</span>, <span style="color: #000000;">14</span> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">WHEN</span> oRec:<span style="color: #000000;">Modified</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span>oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, lSave := .T.<span style="color: #000000;">)</span><br /> @ <span style="color: #000000;">172</span>, <span style="color: #000000;">363</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Cancel"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">42</span>, <span style="color: #000000;">14</span> <span style="color: #0000ff;">PIXEL</span> CANCEL <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span>oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /> <span style="color: #00C800;">if</span> lSave<br /> oRec:<span style="color: #000000;">Save</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oRec:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> oStates:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /> </div>[/code:1v66xov4] |
xbrowse edit dbcombo | Mr. Rao,
thank You very much.
Your sample is great and very useful for my new project.
best regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
xbrowse edit dbcombo | Mr. Rao,
adding some logic for practical uses to Your sample :
I explain
There is a CUSTOMER.dbf and PRODUCTS.dbf ( instead of STATE.dbf )
CUSTOMER.dbf includes 4 new fields
[color=#0000FF:2kodkl8i]PRODUCT
VALUE
QUANTUM
AMOUNT[/color:2kodkl8i]
1.) The user selects a product with the combo
2.) Selecting a product, the price from PRODUCTS is added to column CUSTOMER-VALUE from the combo-selection
3.) The user defines the QUANTUM
4.) The field AMOUNT is calculated VALUE * QUANTUM = AMOUNT
5.) TOTAL of column AMOUNT on FOOTER
that makes it VERY useful and saves a lot of input-time !!!
maybe there is any sample <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> , otherwise I have to carry on testing.
[img:2kodkl8i]http://www.pflegeplus.com/IMAGES/XbrCombo1.jpg[/img:2kodkl8i]
best regards
Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> |
xbrowse edit dbcombo | Mr. Nages,
The dbcombo sample code you supplied, compiles and runs fine.
I will implement it in my code and persue.
-------
Using Tdatabase() is new to me and the burning question is, what setup is needed
to use your example in a multiuser environment. ( lShared, lBuffer ? ).
Is there a sample somewhere, I could reference ?
Gratefully,
Bruce S. |
xbrowse edit dbcombo | [quote="brewster":3n6nci3l]Mr. Nages,
The dbcombo sample code you supplied, compiles and runs fine.
I will implement it in my code and persue.
-------
Using Tdatabase() is new to me and the burning question is, what setup is needed
to use your example in a multiuser environment. ( lShared, lBuffer ? ).
Is there a sample somewhere, I could reference ?
Gratefully,
Bruce S.[/quote:3n6nci3l]
TDatabase by default is set for multiuser use and is buffered.
I suggest you do not do anything. Just use it.
You can work directly with RDD too. The above sample code works directly with RDD also.
Why do u want to use TDataBase? |
xbrowse edit dbcombo | Mr. Nages,
>>>Why do u want to use TDataBase?
Your original posted sample used Tdatabase and I thought I'd try and become familiar with it.
I am relatively new to FWH.
I have converted all(most) of my Clipper programs to FWH and want to make them all into multiuser applications.
I'm familiar with record /file locking the old way, but knew the next step was to take advantage of ADO, ADS, SQL, etc. of which I know nothing about.
Also, using ADO examples in the forum, I have built working applications.
The wrestling with above samples helps me to begin to even ask valid questions.
I'd like to stay with .dbfs and apply something with a decent learning curve.
The vaque question is, which one do I choose ?
Recently, Jeff Barnes and others threads have provided food for thought.
Regards,
Bruce S. |
xbrowse edit message (solved) | I need to edit a column under conditions
my code
oBrw:aCols[5]:nEditType := EDIT_GET
oBrw:aCols[5]:bOnPostEdit := {|o, v, n| iif( n != VK_ESCAPE, (IF(! DET->SDETAIL,EDITLU(v,OBRW,@TABPARAM,,LCOPY,LMODE,TABSEC,@TABTOT), ) ), ) }
oBrw:aCols[5]:beditwhen := {|o, v, n| IF(DET->SDETAIL,.F. , .T.) }
when i dbl click on the column (when not allowed to edit) it is ok nothing happens
if i press on the enter key twice i get the following message
ocol:aeditlisttxt not defined
fivewin class txbrwcolumn
any idea ?
solution in changing method keydown xbrowse.prg
case nKey == VK_RETURN
oCol := ::SelectedCol()
if oCol:oEditGet != nil
PostMessage( oCol:oEditGet:hWnd, WM_KEYDOWN, nKey ) //VK_RETURN )
elseif oCol:lEditable .and. ! oCol:hChecked .and. ::lEnterKey2Edit .and. ! ( oCol:nEditType == EDIT_LISTBOX .or. oCol:nEditType == EDIT_GET_LISTBOX )
return oCol:Edit()
elseif (oCol:nEditType != EDIT_LISTBOX .or. oCol:nEditType != EDIT_GET_LISTBOX) .AND. oCol:lEditable // chidiak
//Simulate Click over button for no lost focus
PostMessage( oCol:oBtnList:hWnd, WM_LBUTTONDOWN, 1, 1 )
PostMessage( oCol:oBtnList:hWnd, WM_LBUTTONUP, 1, 1 )
elseif ::oTreeItem!=nil
If( ::oTreeItem:oTree != nil,( ::oTreeItem:Toggle(), ::Refresh() ),)
else
::GoRight()
endif |
xbrowse ejemplo basico soy principiante | Saludos comunidad: Requiero de su ayuda, para cnfigurar mi xbrowse como lo hacia en clipper, viendo ejemplo ya hize que mi DBF se vea en el xbrowse pero ahora quiero filtrar mi DBFS que tiene un campo llamado TIPO_DOC esta campo tiene como valores FA = factura, DV = Devolucion, TA = Talon y X mas
Quiero que mi xbrowse Solo visualiza el Rango de FA o el Rango de DV mi funcion es la siguiente:
PROCEDURE VerBrowse
LOCAL oDlg, oBto1, oBto2, oChk, lChk := .F., oLbs, oVis, lVis := .F.
PRIVATE m_Serie, m_Fac, Abre_Ok, oBrw
Abre_Ok := .T.
* Abrimos bases de datos
ABRE("VENTA")
* Si no pudo crear la base temporal regresa a MENUSYS
IF !Abre_Ok
CLOSE ALL
RETURN
ENDIF
SELECT VENTA
SET ORDER TO 1
VENTA->(DbSeek("FA")
DEFINE DIALOG oDlg TITLE "browse" FROM 01, 01 TO 30, 30 OF oWnd
@ 01, 01 XBROWSE oBrw ;
FIELDS VENTA->Tipo_Doc, VENTA->No_Serie, VENTA->No_Referen ;
HEADERS 'Doc', 'Serie', 'Numero';
SIZES 020, 070, 050 ;
SIZE 300, 200 PIXEL ALIAS 'venta' OF oDlg
oBrw:nRowDividerStyle = LINESTYLE_NOLINES
oBrw:nColDividerStyle = LINESTYLE_BLACK
oBrw:nMarqueeStyle = MARQSTYLE_HIGHLROW
oBrw:CreateFromCode()
ACTIVATE DIALOG oDlg CENTERED
CLOSE ALL
RETURN
Tengo que poner un codeblock para especificar el inicio de GOTOP de inicio que segun yo seria:
oBrw:bGoTop := { || VENTA->Tipo_Doc = "FA" }
oBrw:bGoBottom := { || VENTA->Tipo_Doc = "FA" }
Pero me siguen apareciendo los DV y los TA
me pueden ayudar Saludos, Soy principiante en Estoy de FIVEWIN apenas estoy pasando mis programas de CLIPPER a FIVEWIN <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> |
xbrowse ejemplo basico soy principiante | Si estás usando índices CDX sería algo tan sencillo como esto para establecer el rango que quieres:
//
VENTA->(ordscope(TOPSCOPE, "FA"))
VENTA->(ordscope(BOTTOMSCOPE, "FA"))
y para ihabilitarlo:
VENTA->(ordscope(TOPSCOPE, NIL))
VENTA->(ordscope(BOTTOMSCOPE, NIL))
// |
xbrowse ejemplo basico soy principiante | Estoy usando Indices NTX por el momento. pero deja indago como crear los CDX para hacer la prueba si es mas fail con CDX voy a tener que migrar todos mis Indices <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Gracias <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
porque llevo 15 Dias que estoy conociendo como se programa en FIVEWIN <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: --> |
xbrowse ejemplo basico soy principiante | [code=fw:tcl7lufp]<div class="fw" id="{CB}" style="font-family: monospace;"><br />#xcommand @ <nRow>, <nCol> <span style="color: #000000;">[</span> COLUMN <span style="color: #000000;">]</span> <span style="color: #0000ff;">XBROWSE</span> <oBrw> ;<br /> ...<br /> <span style="color: #000000;">[</span> <span style="color: #000000;">[</span> FIELDS <span style="color: #000000;">]</span> <Flds,...><span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">SELECT</span> <cField> <span style="color: #00C800;">FOR</span> <uValue1> <span style="color: #000000;">[</span> <span style="color: #0000ff;">TO</span> <uValue2> <span style="color: #000000;">]</span> <span style="color: #000000;">]</span> ;<br /> ...<br /> </div>[/code:tcl7lufp]
En tu caso:
[code=fw:tcl7lufp]<div class="fw" id="{CB}" style="font-family: monospace;"><br />@ <span style="color: #000000;">01</span>, <span style="color: #000000;">01</span> <span style="color: #0000ff;">XBROWSE</span> oBrw ;<br /> FIELDS VENTA->Tipo_Doc, VENTA->No_Serie, VENTA->No_Referen ;<br /> HEADERS <span style="color: #ff0000;">'Doc'</span>, <span style="color: #ff0000;">'Serie'</span>, <span style="color: #ff0000;">'Numero'</span>;<br /> SIZES <span style="color: #000000;">020</span>, <span style="color: #000000;">070</span>, <span style="color: #000000;">050</span> ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">300</span>, <span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">'venta'</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">SELECT</span> VENTA->Tipo_Doc <span style="color: #00C800;">FOR</span> <span style="color: #ff0000;">"FA"</span> <br /><br />oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> </div>[/code:tcl7lufp]
Existiendo un índice sobre el campo TIPO_DOC y estando seleccionado |
xbrowse ejemplo basico soy principiante | :0 bien y en este Caso puedo seguir usando los indices NTX sin ningun problema y me jala en el browse solo lo que Tenga FA y tengo que poner mi DBF en el puntero de Inicio del FA y listo. |
xbrowse en fwppc | El xbrowse aun no se encuentra implementado en fwppc ?
Me da unos errores de enlazado.
En caso de no estar implementado como puedo hacer un freeze con wbrowse y como puedo meter una imagen en una columna ?
Saludos. |
xbrowse en fwppc | Simón,
No, aún no está disponible.
Puedes mostrar un bitmap en el browse como se hace en el ejemplo FWPPC\samples\tutor10.prg
De momento no puedes hacer freeze. Habría que buscar en estos foros por freeze y ver si se a publicado algo de como hacerlo con un TWBrowse. |
xbrowse en fwppc | Gracias. |
xbrowse error | Que tal, escribo este post, como novato de este excelente lenguaje de desarrollo
estoy practicando con el x browse con el siguiente codigo:
[code:5xse0xhu] DBUSEAREA(.T., , "DEMO", "DEMO" ,.T., .F.)
SET INDEX TO "DEMO"
ORDSETFOCUS("ID")
DBGOTOP()
DEFINE WINDOW oWndP TITLE "Módulo" OF oWnd MDICHILD
oBrwP := TXBrowse():New( oWndP )
oBrwP:cAlias := "DEMO"
oCol := oBrwP:AddCol()
oCol:bStrData :={ ||PASIENTE->ID }
oCol:cHeader := "Id"
oCol:nDataStrAlign := AL_CENTER
oCol:nHeadStrAlign := AL_CENTER
oCol:lAllowSizing := .f.
oCol:oDataFont := oFontP
oCol:oHeaderFont := oFntBrP
oCol:nWidth := 50
oCol:nHeadBmpAlign := AL_LEFT
oCol:nHeadBmpNo := 2
oCol:bClrHeader := {|| {CLR_WHITE, CLR_BLUE} }
oCol:bLClickHeader := { || MSGAlert("Tavo") }
oCol:AddBmpHandle( FwBmpAsc() )
oCol:AddBmpHandle( FwBmpDes() )
oCol:bLDClickData := {|| MSGAlert("Tavo") }
oBrwPacientes:SetRDD()
oBrwPacientes:CreateFromCode()
oBrwPacientes:oClient := oWndP
ACTIVATE WINDOW oWndP VALID SaleP("DEMO");
[/code:5xse0xhu]
pero al pasar el mouse por ensima del grid me marca el siguiente error
[code:5xse0xhu]Error description: Error BASE/41 Scope violation (hidden): TXBROWSE:CHECKTOOLTIP
[/code:5xse0xhu]
este es la pila de llamados
[code:5xse0xhu]Stack Calls
===========
Called from: => TXBROWSE:CHECKTOOLTIP(0)
Called from: => TWINDOW:MOUSEMOVE(0)
Called from: => TCONTROL:MOUSEMOVE(0)
Called from: => TXBROWSE:MOUSEMOVE(2684)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: => TXBROWSE:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: => TMDIFRAME:ACTIVATE(0)
Called from: D:\fivewin\Proy\Dentista\Prg\dent.prg => MAIN(36)
[/code:5xse0xhu]
le he buscado pero no encuentro el problema
cualquier ayuda le agradeceria.
Saludos. |
xbrowse error | Estás usando Harbour ó xHarbour ? Que versión de FWH ? |
xbrowse error | uso Harbour y la versión de FWH es la de April 7.04 2007 build |
xbrowse error | Gustavo,
Has modificado alguna clase de FWH ?
Por favor construye samples\testxbrw.prg y prueba si te da el mismo error. Aqui funciona bien |
xbrowse error | No he modificado clase alguna de FWH,
y este ejemplo si corre correctamente, voy a copiar y pasar a la aplicacion que estoy haciendo.
a ver que pasa
muchisimas gracias, una cosa mas es un excelente trabajo el tuyo, felicidades y lo mejor de los mejor en el futuro. |
xbrowse error fwh 8.08 | I get the following error with xbrowse fwh 8.08Any idea ? same code working ok in fwh 8.07thanks for the help, Error description: Error BASE/1004 Class: 'NIL' has no exported method: EVAL Args: [ 1] = U Stack Calls=========== Called from: => EVAL(0) Called from: C:\CBATI32\xbrowse.PRG => (b)TXBROWSE:TXBROWSE(286) Called from: => TXBROWSE:KEYCOUNT(0) Called from: C:\CBATI32\xbrowse.PRG => TXBROWSE:ADJUST(789) Called from: C:\CBATI32\xbrowse.PRG => TXBROWSE:INITIATE(697) Called from: C:\CBATI32\xbrowse.PRG => TXBROWSE:CREATEFROMCODE(600) |
xbrowse error fwh 8.08 | Richard,What RDD are you using ?It fails as oBrw:bKeyCount is nil. It should be oBrw:bKeyCount := {|| ( oBrw:cAlias )->( OrdKeyCount() ) }Please try to define it yourself and try it again, thanks |
xbrowse error fwh 8.08 | AntonioI am using dbfcdx and the same code has been working for some time, works ok in fwh 08.07oBrw:bKeyCount is nil it should not defining it does not fix the problem,here is the code belowRegardsRichard[code:14yd9u16]
IF OBRWPLA == NIL
INITRANS13(@TRANS)
@ wndpmain:nHeight - 90,05 BUTTONBMP TRANS[28][13] PROMPT "SEMAINE" OF wndpMAIN PIXEL SIZE 150,30 FONT TRANS[09][1] ;
ACTION PLANHEBDO(@TRANS,OBRWPLA,TPAR)
@ 10,200 XBROWSE oBrwpla ;
OF wndpmain ;
SIZE wndpmain:nwidth - 200,wndpmain:nHeight - 30 PIXEL ;
ALIAS TRANS[04]
oCol := oBrwPLA:AddCol()
oCol:bStrData := {|| (TRANS[04])->PLAGE}
AEval( TABVAR[15], { |DLIB,X | CRECOL(x,@TRANS,@OBRWPLA) } )
oBrwPLA:nMarqueeStyle := 1
oBrwpla:nColDividerStyle := LINESTYLE_INSET
oBrwPLA:lColDividerComplete := .T.
oBrwPLA:bClrStd := {|| { CLR_BLUE, CLR_WHITE } }
oBrwPLA:bClrHEADER := {|| { CLR_BLUE, COULDLG("TD") } }
oBRWPLA:blDblClick := { | nRow, nCol, nKey | EditCel(@TRANS, OBRWPLA,@TPAR,nRow,nCol) }
FOR I = 1 TO LEN(oBrwPLA:aCols)
oBrwPLA:aCols[I]:nWidth := TRANS[10][I]
oBrwPLA:aCols[i]:bRClickData := {|| Menucopy(@TRANS,OBRWPLA) }
NEXT
AEVAL(oBrwPLA:aCols, { |DLIB,X | SETCOLBRW(x,@TRANS,@OBRWPLA) } )
obrwPLA:nRowHeight := AGPREF->HCELL
oBrwPLA:ndatalines := 4
oBrwPLA:nHeaderLines := 2
OBRWPLA:nFreeze := 1
oBrwPLA:nCOLSEL := 2
oBrwPLA:nCOLoffset := 1
oBrwPLA:nROWSEL := 1
oBrwPLA:bGotFocus := {|| IF( FILE(TRANS[04] + ".DBF"),dbSelectArea(TRANS[04]), ) }
OBRWPLA:bKeyDown := {|nKey| iif(nKey=VK_DELETE,SUPCEL(@OBRWPLA,@TRANS, .T.) , ) }
oBrwPLA:bKeyCount := {|| ( oBrwPLA:cAlias )->( OrdKeyCount() ) } // this has been added
OBRWPLA:lAllowColHiding := .F.
OBRWPLA:lAllowRowSizing := .F.
OBRWPLA:l2007 := .T.
oBrwPLA:CreateFromCODE()
oBrwPLA:oDragCursor := TRANS[12]
oBrwPLA:bDragBegin := { |nRow,nCol,nFlags| DragBegin( nRow, nCol, nFlags, @TRANS, @oBrwPLA ) }
oBrwPLA:bDropOver := { |uDropInfo, nRow, nCol, nFlags| DropOver( uDropInfo, nRow, nCol, nFlags, @TRANS, @oBrwPLA ) }
ENDIF
OBRWPLA:SETFOCUS()
[/code:14yd9u16] |
xbrowse error fwh 8.08 | Richard,Please try it again setting it after CreateFromCode() call: oBrwPLA:CreateFromCODE() oBrwPLA:bKeyCount := {|| ( oBrwPLA:cAlias )->( OrdKeyCount() ) } // this has been added |
xbrowse error fwh 8.08 | Anotnio,it does not help as the error occurs from createfromcode()this is the error.log regardsRichard Error description: Error BASE/1004 Class: 'NIL' has no exported method: EVAL Args: [ 1] = U Stack Calls=========== Called from: => EVAL(0) Called from: C:\CBATI32\xbrowse.PRG => (b)TXBROWSE:TXBROWSE(286) Called from: => TXBROWSE:KEYCOUNT(0) Called from: C:\CBATI32\xbrowse.PRG => TXBROWSE:ADJUST(789) Called from: C:\CBATI32\xbrowse.PRG => TXBROWSE:INITIATE(697) Called from: C:\CBATI32\xbrowse.PRG => TXBROWSE:CREATEFROMCODE(600) |
xbrowse error fwh 8.08 | Richard,Yes, you are right. I didn't noticed that it was getting called from CreateFromCode().We are working to provide you a solution asap, thanks |
xbrowse error fwh 8.08 | Richard,Please call oBrw:SetRdd() before calling oBrw:CreateFromCode(): oBrw:SetRdd() oBrw:CreateFromCode()without it, we get your same error. We are doing changes and enhancements in the Class TXBrowse and some required changes may be needed. We apologize for these inconveniencies.Here this example is working fine:[code:1a51mvn5]
#include "FiveWin.ch"
#include "XBrowse.ch"
function Main()
local oWnd, oBrw, oCol
USE Customer
DEFINE WINDOW oWnd
@ 0, 0 XBROWSE oBrw OF oWnd ALIAS "Customer"
oCol = oBrw:AddCol()
oCol:bStrData = { || Customer->First }
oCol:cHeader = "First"
oBrw:SetRdd()
oBrw:CreateFromCode()
oWnd:oClient = oBrw
ACTIVATE WINDOW oWnd
return nil
[/code:1a51mvn5] |
xbrowse error fwh 8.08 | Richard,In order to not modify your source code, you can add this code to Class TXBrowse in lines 674 (Method Initiate()):[code:2ql9dva2]
endif // existing endif for: if Empty( ::nDataType ) .or. Empty( ::aCols )
if ( ! Empty( ::cAlias ) ) .and. ( Empty( ::bKeyCount ) .or. Empty( ::bKeyNo ) )
::SetRdd()
endif
[/code:2ql9dva2] |
xbrowse error fwh 8.08 | After compiling with 8-08 iI have this error:Regards,OttoApplication=========== Path and name: C:\xWINHOTEL\xRECHNUNG.exe (32 bits) Size: 2,684,928 bytes Time from start: 0 hours 0 mins 3 secs Error occurred at: 28.08.2008, 12:41:58 Error description: Error BASE/1004 Class: 'NIL' has no exported method: EVAL Args: [ 1] = U Stack Calls=========== Called from: => EVAL(0) Called from: c:\develop8\WH_Fwh\xRg\xbrowse.prg => (b)TXBROWSE:TXBROWSE(281) Called from: => TXBROWSE:KEYCOUNT(0) Called from: c:\develop8\WH_Fwh\xRg\xbrowse.prg => TXBROWSE:ADJUST(771) Called from: c:\develop8\WH_Fwh\xRg\xbrowse.prg => TXBROWSE:INITIATE(679) Called from: c:\develop8\WH_Fwh\xRg\xbrowse.prg => TXBROWSE:CREATEFROMCODE(589) Called from: c:\develop8\WH_Fwh\xRg\RECHNUNG.PRG => EXEC_ZIRECHNUNG(3929) Called from: c:\develop8\WH_Fwh\xRg\RECHNUNG.PRG => ZIRECHNUNG(411) Called from: c:\develop8\WH_Fwh\xRg\RECHNUNG.PRG => (b)MAIN(359) Called from: c:\develop8\WH_Fwh\xRg\window.prg => TMDIFRAME:ACTIVATE(876) Called from: c:\develop8\WH_Fwh\xRg\RECHNUNG.PRG => MAIN(359) |
xbrowse error fwh 8.08 | Richard, Otto,Please download a new FWH 8.08 build that fixes this bug. It will be available in just some minutes (we are uploading it now).We apologize for these inconveniencies |
xbrowse error fwh 8.08 | AntonioIt is working ok now <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Thank youRegardsRichard |
xbrowse error fwh 8.08 | Richard,Many thanks for the feedback <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
xbrowse error fwh 8.08 | AntonioWhen a dbf is filtered the method refresh is not working properly (error message) Error occurred at: 03/09/2008, 09:13:14 Error description: Error BASE/1003 Variable does not exist: DTYPEStack Calls=========== Called from: C:\CBATI32\xbrowse.PRG => TXBROWSE:DELREPOS(874) Called from: C:\CBATI32\xbrowse.PRG => TXBROWSE:REFRESH(838) This is the offending line bFilter := ( ::cAlias )->( &cFilter )HthRichard |
xbrowse error fwh 8.08 | XBrowse nowhere uses a variable DTYPE.Probably it is a variable in the filter in the application program, which is out of scope. Is it a local or static variable in the application program used in the filter experession?It appears that XBrowse assumes that the filter set by the programmer as retrieved from DbSetfilter() can always be converted to a valid codeblock. This assumption fails when the filter set in the application program uses local variables, which would not be available within Xbrowse.prg.Till this issue is solved in the library I suggest a temporary fix.to comment our lines out lines from 871 to 879. |
xbrowse error wih lMergeVert | Hi Guys,
I have a xbrowse built over a mysql rowset and using lMergeVert. It´s working fine.
Always I try to do an oRs:Requery() to update data. Is Happening the error bellow:
[code=fw:39jfn5wk]<div class="fw" id="{CB}" style="font-family: monospace;">Compiler version: <span style="color: #000000;">Harbour</span> <span style="color: #000000;">3.2</span>.0dev <span style="color: #000000;">(</span>r2008190002<span style="color: #000000;">)</span><br /> FiveWin Version: <span style="color: #000000;">FWH</span> <span style="color: #000000;">21.04</span><br /> Windows version: <span style="color: #000000;">10.0</span>, Build <span style="color: #000000;">19045</span> <br /><br /> Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">26</span> mins <span style="color: #000000;">12</span> secs <br /> Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">21</span>/<span style="color: #000000;">12</span>/<span style="color: #000000;">2023</span>, <span style="color: #000000;">09</span>:<span style="color: #000000;">34</span>:<span style="color: #000000;">01</span><br /> Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1132</span> Bound error: <span style="color: #000000;">array</span> access<br /> Last Query: <span style="color: #0000ff;">SELECT</span> COLUMN_NAME, REFERENCED_TABLE_SCHEMA, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME<br /> <span style="color: #0000ff;">FROM</span> information_schema.KEY_COLUMN_USAGE<br /> <span style="color: #0000ff;">WHERE</span> TABLE_SCHEMA = <span style="color: #ff0000;">'saga_sgv'</span><br /> AND TABLE_NAME = <span style="color: #ff0000;">'tmovgpes'</span><br /> AND REFERENCED_TABLE_NAME IS NOT <span style="color: #00C800;">NULL</span><br /> <span style="color: #000000;">[</span> SUCCESS <span style="color: #000000;">]</span><br /> Args:<br /> <span style="color: #000000;">[</span> <span style="color: #000000;">1</span><span style="color: #000000;">]</span> = A <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> <span style="color: #000000;">[</span> <span style="color: #000000;">2</span><span style="color: #000000;">]</span> = N <span style="color: #000000;">1</span><br /><br />Stack Calls<br />===========<br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">XBROWSE</span>.PRG => TXBRWCOLUMN:<span style="color: #000000;">MERGEAREA</span><span style="color: #000000;">(</span> <span style="color: #000000;">17094</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">XBROWSE</span>.PRG => TXBRWCOLUMN:<span style="color: #000000;">PAINTCELLBACK</span><span style="color: #000000;">(</span> <span style="color: #000000;">14394</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">XBROWSE</span>.PRG => TXBRWCOLUMN:<span style="color: #000000;">PAINTCELL</span><span style="color: #000000;">(</span> <span style="color: #000000;">14477</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">XBROWSE</span>.PRG => TXBRWCOLUMN:<span style="color: #000000;">PAINTDATA</span><span style="color: #000000;">(</span> <span style="color: #000000;">14322</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #0000ff;">PAINT</span><span style="color: #000000;">(</span> <span style="color: #000000;">2495</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #00C800;">DISPLAY</span><span style="color: #000000;">(</span> <span style="color: #000000;">2167</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">CONTROL</span>.PRG => TCONTROL:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">(</span> <span style="color: #000000;">1793</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">XBROWSE</span>.PRG => TXBROWSE:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">(</span> <span style="color: #000000;">11993</span> <span style="color: #000000;">)</span></div>[/code:39jfn5wk]
IF I try it with the most recent version of FWH, only the line of the error is being changed. As you can see bellow:
[code=fw:39jfn5wk]<div class="fw" id="{CB}" style="font-family: monospace;"> Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">XBROWSE</span>.PRG => TXBRWCOLUMN:<span style="color: #000000;">MERGEAREA</span><span style="color: #000000;">(</span> <span style="color: #000000;">17718</span> <span style="color: #000000;">)</span></div>[/code:39jfn5wk] |
xbrowse error wih lMergeVert | Wondering how can I test this program at my end. |
xbrowse features | I can group the data of a stored archive into an xbrowse by pressing a button and do it online (from the end user) for example by taking the customer.dbf archive I could group the archive by state, city, and show partial totals |
xbrowse features | I think I posted a few samples like this. Please search |
xbrowse features | ok Now I remember there was somthing |
xbrowse features | Nages,
I found it ( your sample) but I wish it on line from symply to tree and viceversa |
xbrowse features | I found this but it init from tree
I wish show the customers normally and then if if the final user press a button make the group
the final user can select the type of groups for eah field he wants ( or the field I can set as selection)
[code=fw:34ys361s]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.Ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"ord.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />REQUEST DBFCDX<br /><br /><span style="color: #00C800;">static</span> cFwhPath := <span style="color: #ff0000;">"c:<span style="color: #000000;">\w</span>ork<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\"</span><br /><br />//----------------------------------------------------------------------------//<br /><br />function Main()<br /><br /> BrowseTree( MakeTree() )<br /><br />return (0)<br /><br />//----------------------------------------------------------------------------//<br /><br />init procedure PrgInit<br /><br /> SET DATE ITALIAN<br /> SET CENTURY ON<br /> SET TIME FORMAT TO "</span>HH:<span style="color: #000000;">MM</span>:<span style="color: #000000;">SS</span><span style="color: #ff0000;">"<br /> SET EPOCH TO YEAR(DATE())-50<br /><br /> SET DELETED ON<br /> SET EXCLUSIVE OFF<br /><br /> RDDSETDEFAULT( "</span>DBFCDX<span style="color: #ff0000;">" )<br /><br /> XbrNumFormat( 'E', .t. )<br /> SetKinetic( .f. )<br /> SetGetColorFocus()<br /> SetBalloon( .t. )<br /><br />return<br /><br />//----------------------------------------------------------------------------//<br /><br />static function MakeTree()<br /><br /> field STATE,CODE,CITY<br /><br /> local cPath := cFwhPath + "</span>samples\\<span style="color: #ff0000;">"<br /> local oTree, oState, oCity<br /><br /> USE ( cPath + "</span>STATES<span style="color: #ff0000;">" ) NEW SHARED<br /> INDEX ON CODE TAG CODE TO STMP MEMORY<br /> USE ( cPath + "</span>CUSTOMER<span style="color: #ff0000;">" ) NEW ALIAS CUST SHARED<br /> INDEX ON STATE+CITY TAG STATE TO CTMP MEMORY<br /> SET RELATION TO STATE INTO STATES<br /> GO TOP<br /><br /> TREE oTree<br /> oTree:Cargo := { "</span><span style="color: #ff0000;">", 0, 0.00, 0 }<br /> do while ! CUST->( eof() )<br /> TREEITEM oState PROMPT STATES->NAME CARGO { CTOD( "</span><span style="color: #ff0000;">" ), 0, 0.00, 0 }<br /> TREE<br /> do while STATES->NAME == oState:cPrompt .and. ! CUST->( eof() )<br /> TREEITEM oCity PROMPT CUST->CITY ;<br /> CARGO { CUST->HIREDATE, CUST->AGE, CUST->SALARY, CUST->( RECNO() ) }<br /> oState:Cargo[ 2 ] += oCity:Cargo[ 2 ]<br /> oState:Cargo[ 3 ] += oCity:Cargo[ 3 ]<br /> CUST->( DbSkip( 1 ) )<br /> enddo<br /> TREEITEM "</span>Sub-Total<span style="color: #ff0000;">" CARGO oState:Cargo<br /> oTree:Cargo[ 2 ] += oState:Cargo[ 2 ]<br /> oTree:Cargo[ 3 ] += oState:Cargo[ 3 ]<br /> ENDTREE<br /><br /> enddo<br /> ENDTREE<br /><br />return oTree<br /><br />//----------------------------------------------------------------------------//<br /><br />static function BrowseTree( oTree )<br /><br /> local oDlg, oBrw, oFont<br /> local nGrpClr := RGB(255,250,220)<br /> local nTotClr := RGB(200,255,200)<br /><br /> DEFINE FONT oFont NAME "</span>TAHOMA<span style="color: #ff0000;">" SIZE 0,-14<br /> DEFINE DIALOG oDlg SIZE 620,700 PIXEL FONT oFont ;<br /> TITLE "</span>EDITABLE TREE BROWSE WITH SUBTOTALS<span style="color: #ff0000;">"<br /><br /> @ 20,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg DATASOURCE oTree ;<br /> COLUMNS 1, 2, 3 ;<br /> HEADERS "</span>State/City<span style="color: #ff0000;">", "</span>HireDate<span style="color: #ff0000;">", "</span>Number<span style="color: #ff0000;">", "</span>Salary<span style="color: #ff0000;">" ;<br /> PICTURES nil, nil, nil, NumPict ( 12, 2 ) ;<br /> CELL LINES FOOTERS FASTEDIT NOBORDER<br /><br /> WITH OBJECT oBrw<br /> :nStretchCol := 1<br /> :lDisplayZeros := .f.<br /> :bChange := { || CUST->( DBGOTO( oBrw:oTreeItem:Cargo[ 4 ] ) ) }<br /> :bLock := { || CUST->( RLOCK() ) }<br /> :bUnLock := { || CUST->( DBUNLOCK() ) }<br /><br /> :bClrStd := { || { CLR_BLACK, If( oBrw:oTreeItem:nLevel == 1, nGrpClr, ;<br /> If( oBrw:oTreeItem:cPrompt == "</span>Sub-Total<span style="color: #ff0000;">", nTotClr, ;<br /> CLR_WHITE ) ) } }<br /> // Bitmaps<br /> WITH OBJECT :aCols[ 1 ]<br /> :AddBitmap( { FWRArrow(), FWDArrow(), cFwhPath + "</span><span style="color: #0000ff;">bitmaps</span>\16x16\reset.bmp<span style="color: #ff0000;">" } )<br /> :cFooter := "</span>GRAND TOTAL<span style="color: #ff0000;">"<br /> END<br /> // When Group is closed show totals. When open show totals at bottom<br /> // Allow edit of columns and save data to DBF, update group and grand totals<br /> WITH OBJECT :aCols[ 3 ]<br /> :bEditValue := { |x| If( oBrw:oTreeItem:lOpened, 0, ;<br /> If( x == nil, oBrw:oTreeItem:Cargo[ 2 ], ;<br /> CUST->AGE := oBrw:oTreeItem:Cargo[ 2 ] := x ) ) }<br /> :nTotal := oTree:Cargo[ 2 ]<br /> //<br /> :nEditType := EDIT_GET<br /> :bEditWhen := { || oBrw:oTreeItem:nLevel > 1 .and. oBrw:oTreeItem:cPrompt != "</span>Sub-Total<span style="color: #ff0000;">" }<br /> :bOnChange := { |o,nOld| oBrw:oTreeItem:Parent():Cargo[ 2 ] += ( o:Value - nOld ), oBrw:Refresh() }<br /> END<br /> WITH OBJECT :aCols[ 4 ]<br /> :bEditValue := { |x| If( oBrw:oTreeItem:lOpened, 0, ;<br /> If( x == nil, oBrw:oTreeItem:Cargo[ 3 ], ;<br /> CUST->SALARY := oBrw:oTreeItem:Cargo[ 3 ] := x ) ) }<br /> :nTotal := oTree:Cargo[ 3 ]<br /> //<br /> :nEditType := EDIT_GET<br /> :bEditWhen := { || oBrw:oTreeItem:nLevel > 1 .and. oBrw:oTreeItem:cPrompt != "</span>Sub-Total<span style="color: #ff0000;">" }<br /> :bOnChange := { |o,nOld| oBrw:oTreeItem:Parent():Cargo[ 3 ] += ( o:Value - nOld ), oBrw:Refresh() }<br /> END<br /> //<br /> :CreateFromCode()<br /> END<br /><br /> Eval( oBrw:bChange )<br /><br /> ACTIVATE DIALOG oDlg CENTERED<br /> RELEASE FONT oFont<br /><br />return nil<br /><br />//----------------------------------------------------------------------------//<br /></span></div>[/code:34ys361s]
But this sample I see a group of states ok
but for each state I wish show from first column of Browse
Fist,Last,street,city,zip
and order for first
I mean as this
[img:34ys361s]https://s4.postimg.org/6m27w72b1/Immagine.jpg[/img:34ys361s] |
xbrowse footer y mysql | Por favor (ya lei los ejeplos de la carpeta samples) podrian decirme
como se hace sensillamente para mostrar en un xbrowse que la ultima columna sea sumada
y me muestre "el total de deuda" que tiene?
porque la verdad estoy dando tantas vueltas que ya ni se que es lo que hay q hacer, solo copio y pego
y no entiendo el funcionbamiento del maketotals
gracias. |
xbrowse footer y mysql | goosfancito
Intenta asi:
[code=fw:23ltn5b7]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oQry:=oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"SELECT * SUM( DEBE ) TotalDebe FROM TABLA"</span><span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">//En xBrowse</span><br />oBrw:<span style="color: #000000;">lFooter</span>=.T.<br /><br /> oCol:=oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oCol:<span style="color: #000000;">bStrData</span> := <span style="color: #000000;">{</span> || oQry:<span style="color: #000000;">DEBE</span> <span style="color: #000000;">}</span> <br /> oCol:<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br /> oCol:<span style="color: #000000;">cHeader</span> := <span style="color: #ff0000;">"DEBE"</span><br /> oCol:<span style="color: #000000;">bfooter</span>:=<span style="color: #000000;">{</span>|| <span style="color: #000000;">(</span><span style="color: #ff0000;">"TOTAL DEBE: "</span>+Trans<span style="color: #000000;">(</span>TotalDebe,<span style="color: #ff0000;">"99,999.99"</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> </div>[/code:23ltn5b7]
Saludos,
Adhemar |
xbrowse footer y mysql | Adhemar...
Este query está mal:
[code=fw:2tlpi8l9]<div class="fw" id="{CB}" style="font-family: monospace;">oQry:=oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"SELECT * SUM( DEBE ) TotalDebe FROM TABLA"</span><span style="color: #000000;">)</span></div>[/code:2tlpi8l9]
Debería ser:
[code=fw:2tlpi8l9]<div class="fw" id="{CB}" style="font-family: monospace;">oQry:=oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"SELECT SUM( DEBE ) AS TotalDebe FROM TABLA"</span><span style="color: #000000;">)</span></div>[/code:2tlpi8l9]
Saludos, |
xbrowse footer y mysql | les comento.
el importe que esta en la columna que necesito acumular se calcula por dos campos mas y el iva y ganancia...
por lo que apunta a una funcion donde lee una tabla y hace el calculo.
[code=fw:1aojzfdm]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> a<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> <span style="color: #000000;">(</span>b = a + iva + ganancia<span style="color: #000000;">)</span><br /> </div>[/code:1aojzfdm]
el problema que no se como implementar el acumulador del footer. porque? porque cada vez que repinta el xbrowse me vuelve a acumular todo.
pense que al usar el maketotals sobre esa columna solo hacia el calculo... |
xbrowse footer y mysql | goosfancito
Tendrías que recorrer tu tabla e ir cargándola a un Array luego tu array lo mostras en el browse.
Saludos,
Adhemar |
xbrowse footer y mysql | [quote="jrestojeda":vy7vhp2q]Adhemar...
Este query está mal:
[code=fw:vy7vhp2q]<div class="fw" id="{CB}" style="font-family: monospace;">oQry:=oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"SELECT * SUM( DEBE ) TotalDebe FROM TABLA"</span><span style="color: #000000;">)</span></div>[/code:vy7vhp2q]
Debería ser:
[code=fw:vy7vhp2q]<div class="fw" id="{CB}" style="font-family: monospace;">oQry:=oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"SELECT SUM( DEBE ) AS TotalDebe FROM TABLA"</span><span style="color: #000000;">)</span></div>[/code:vy7vhp2q]
Saludos,[/quote:vy7vhp2q]
Realmente el "AS" es opcional, la sentencia de Adhemar es correcta
este ejemplo me funciona usando DBF, con una columna calculada, con MySql deberia ser igual, puedes ejecutarlo desde la carpeta samples de fivewin
[code=fw:vy7vhp2q]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span> <br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"XBrowse.ch"</span> <br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /><br /> <span style="color: #00C800;">local</span> oWnd, oBrw, oCol <br /><br /> USE clientes <br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <br /> <br /> @ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"clientes"</span> <br /> <br /> oBrw:<span style="color: #000000;">lFastEdit</span> = .T. <br /> oBrw:<span style="color: #000000;">lFooter</span> = .T.<br /> <br /> <br /> oCol = oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /> oCol:<span style="color: #000000;">bEditValue</span> = <span style="color: #000000;">{</span> || clientes->Nombre <span style="color: #000000;">}</span> <br /> oCol:<span style="color: #000000;">cHeader</span> = <span style="color: #ff0000;">"Nombre"</span> <br /> <br /> oCol = oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oCol:<span style="color: #000000;">cHeader</span> = <span style="color: #ff0000;">"Monto"</span> <br /> oCol:<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">{</span> || importe<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> oCol:<span style="color: #000000;">cEditPicture</span> = <span style="color: #ff0000;">"999,999.99"</span><br /> oCol:<span style="color: #000000;">nTotal</span> = <span style="color: #000000;">0</span><br /> oCol:<span style="color: #000000;">nWidth</span> = <span style="color: #000000;">60</span><br /> oCol:<span style="color: #000000;">lTotal</span> = .T.<br /> <br /> oCol = oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /> oCol:<span style="color: #000000;">bEditValue</span> = <span style="color: #000000;">{</span> || clientes->Direccion <span style="color: #000000;">}</span> <br /> oCol:<span style="color: #000000;">cHeader</span> = <span style="color: #ff0000;">"Direcccion"</span> <br /> <br /> oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /> <br /> oWnd:<span style="color: #000000;">oClient</span> = oBrw <br /> oBrw:<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span><span style="color: #000000;">(</span>oBrw:<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><br /><span style="color: #00C800;">function</span> importe<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> nCalculo <br /> nCalculo = clientes->edad * clientes->nivel<br /><span style="color: #00C800;">return</span> nCalculo<br /> </div>[/code:vy7vhp2q] |
xbrowse footer y mysql | Gracias.
Ningun campo que muestro en el xbrowse es editable. solo muestran info. he visto que todos los que usan maketotals hacen sobre un campo editable. |
xbrowse footer y mysql | [quote="Daniel Garcia-Gil":4v1cwuj6][quote="jrestojeda":4v1cwuj6]Adhemar...
Este query está mal:
[code=fw:4v1cwuj6]<div class="fw" id="{CB}" style="font-family: monospace;">oQry:=oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"SELECT * SUM( DEBE ) TotalDebe FROM TABLA"</span><span style="color: #000000;">)</span></div>[/code:4v1cwuj6]
Debería ser:
[code=fw:4v1cwuj6]<div class="fw" id="{CB}" style="font-family: monospace;">oQry:=oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"SELECT SUM( DEBE ) AS TotalDebe FROM TABLA"</span><span style="color: #000000;">)</span></div>[/code:4v1cwuj6]
Saludos,[/quote:4v1cwuj6]
Realmente el "AS" es opcional, la sentencia de Adhemar es correcta[/quote:4v1cwuj6]
Daniel... y el "*" sin poner una coma antes del Sum(DEBE)??
Yo pruebo un query similar y da error... |
xbrowse footer y mysql | [quote="goosfancito":1jfmut28]Gracias.
Ningun campo que muestro en el xbrowse es editable. solo muestran info. he visto que todos los que usan maketotals hacen sobre un campo editable.[/quote:1jfmut28]
En el ejemplo no he colocado ninguna columna editable |
xbrowse footer y mysql | [quote="Daniel Garcia-Gil":2hv3hu9p][quote="goosfancito":2hv3hu9p]Gracias.
Ningun campo que muestro en el xbrowse es editable. solo muestran info. he visto que todos los que usan maketotals hacen sobre un campo editable.[/quote:2hv3hu9p]
En el ejemplo no he colocado ninguna columna editable[/quote:2hv3hu9p]
Estas en lo cierto |
xbrowse freeze and goto column | To All
I am trying to migrate all my listboxes to xbrowse .. specifically 2 commands in Hernans txbrowse ..
I need to go to a specific column on dialog init .. oBrow:GoToCol(nCOL )
[code=fw:nohq5e9r]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oEMP <span style="color: #0000ff;">NOWAIT</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span> oEMP:<span style="color: #0000ff;">Move</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>,;<br /> <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span> <span style="color: #000000;">(</span>xSUPER = <span style="color: #ff0000;">'Y'</span>.or. xMGR = <span style="color: #ff0000;">'Y'</span> .or. xADMIN = <span style="color: #ff0000;">'Y'</span><span style="color: #000000;">)</span>, ,oBTN4:<span style="color: #000000;">HIDE</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, ;<br /> oBROW:<span style="color: #000000;">GoToCol</span><span style="color: #000000;">(</span>nCOL<span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> </div>[/code:nohq5e9r]
and to freeze 5 columns to the left of the scrolling listbox ..
oBROW:nFREEZE := 5
Thanks in advance
Rick Lipkin |
xbrowse freeze and goto column | XBrowse:
oBrw:nFreeze := 5 // same syntax in xbrowse too
Instead of oBrw:GotoCol, XBrowse has a more powerful method:
oBrw:SetPos( nRow, nCol, [ lPixel DEFAULT .f. ] )
You can say oBrw:SetPos( 1, 6 ) to position cursor in the 1st row 6th column. |
xbrowse freeze and goto column | Rao
Good to hear back from an old friend .. I have been out of the FWH community for some time and have decided to do some contracting work and perhaps market many of my applications I have built over the many years ..
Human Resources, Time and reporting, Inventory, Sales and route mgmt, Accounts receivable\payables, Property Mgmt, fleet Vehicle reservations, church and organizational memberships, purchasing and requisitions ..
Thinking about forming a company ( limited liability corporation 'llc' ) and need a business partner .. if you have a desire to come to South Carolina, USA .. let me know !!!
I have a new e-mail address <!-- e --><a href="mailto:r1.1955@live.com">r1.1955@live.com</a><!-- e --> ..
Thanks for your quick help !
Rick Lipkin
[img:1uvieul4]http://img689.imageshack.us/img689/339/mywork1.jpg[/img:1uvieul4]
[img:1uvieul4]http://img42.imageshack.us/img42/7719/rickswork.jpg[/img:1uvieul4] |
xbrowse function toCalc | hi,
I have this xbrowse:
[url=https://imgur.com/APp21O5:1zxi2e6i][img:1zxi2e6i]http://i.imgur.com/APp21O5.jpg[/img:1zxi2e6i][/url:1zxi2e6i]
I try to export in Excel(obrw:toexcel) and OpenOffice (oBrw:tcalc()).
in Excel it's ok:
[url=https://imgur.com/sOmjG0B:1zxi2e6i][img:1zxi2e6i]http://i.imgur.com/sOmjG0B.jpg[/img:1zxi2e6i][/url:1zxi2e6i]
but in Calc I get this:
[url=https://imgur.com/VpyQD4X:1zxi2e6i][img:1zxi2e6i]http://i.imgur.com/VpyQD4X.jpg[/img:1zxi2e6i][/url:1zxi2e6i]
column ARTICOLO become Numeric rounded.
any help?
thank you |
xbrowse function toCalc | I tested the following code and found that I am getting the right result in Calc
[code=fw:1onz5079]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><span style="color: #B900B9;">//---------------------------------------------</span><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Local</span> oDlg,oBrw,aData,oBar<br /> <br /> aData:=<span style="color: #000000;">{</span> <span style="color: #000000;">{</span><span style="color: #ff0000;">"F305"</span>, <span style="color: #ff0000;">"73.0024.61,7"</span>, <span style="color: #000000;">368</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test ToCalc"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">350</span>,<span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL<br /> <br /> @<span style="color: #000000;">50</span>,<span style="color: #000000;">01</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-0</span>,<span style="color: #000000;">-0</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">STYLE</span> <span style="color: #000000;">2013</span> <span style="color: #0000ff;">UPDATE</span> ; <br /> DATASOURCE aData ;<br /> COLUMNS <span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span> ;<br /> HEADERS <span style="color: #ff0000;">"CD.PIANIFICIAZONE"</span>, <span style="color: #ff0000;">"ARTICOLO"</span> , <span style="color: #ff0000;">"RESIDUO"</span> ;<br /> CELL LINES FOOTERS AUTOSORT NOBORDER<br /> <br /> WITH OBJECT oBrw<br /> :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /> END <br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oBrw:<span style="color: #000000;">oWnd</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">56</span>,<span style="color: #000000;">44</span> <span style="color: #000000;">2013</span> <br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Excel"</span> ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">ToExcel</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Calc"</span> ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">ToCalc</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">NIL</span></div>[/code:1onz5079]
Tested using OpenOffice 3.1.0
[url=https://imgbb.com/:1onz5079][img:1onz5079]https://image.ibb.co/nMNHOV/Dlg.png[/img:1onz5079][/url:1onz5079]
Calc Result
[url=https://imgbb.com/:1onz5079][img:1onz5079]https://image.ibb.co/kK9QAA/Calc-Result.png[/img:1onz5079][/url:1onz5079]
openOffice Version
[url=https://imgbb.com/:1onz5079][img:1onz5079]https://image.ibb.co/eJ3Dxq/Open-Office-Version.png[/img:1onz5079][/url:1onz5079] |
xbrowse function toCalc | thank you anserkk, I'll try your example |
xbrowse fwh2006 sqlrdd erro | segue o erro
[img:17kmfbkh]https://uploaddeimagens.com.br/images/002/772/739/original/WhatsApp_Image_2020-07-15_at_20.11.50.jpeg?1594855645[/img:17kmfbkh]
[code=fw:17kmfbkh]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">METHOD</span> SQLRDD_SaveState<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TXBrowse<br /><br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">SQLRDD_hState</span> == <span style="color: #00C800;">nil</span><br /> ::<span style="color: #000000;">SQLRDD_hState</span> := <span style="color: #000000;">{</span>=><span style="color: #000000;">}</span><br /> HSetCaseMatch<span style="color: #000000;">(</span> ::<span style="color: #000000;">SQLRDD_hState</span>, .f. <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> ::<span style="color: #000000;">SQLRDD_hState</span><span style="color: #000000;">[</span> <span style="color: #ff0000;">"nLen"</span> <span style="color: #000000;">]</span> := ::<span style="color: #000000;">nLen</span><br /> ::<span style="color: #000000;">SQLRDD_hState</span><span style="color: #000000;">[</span> <span style="color: #ff0000;">"IndexOrd"</span> <span style="color: #000000;">]</span> := INDEXORD<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">SQLRDD_hState</span><span style="color: #000000;">[</span> <span style="color: #ff0000;">"descend"</span> <span style="color: #000000;">]</span> := OrdDescend<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// erro</span><br /> ::<span style="color: #000000;">SQLRDD_hState</span><span style="color: #000000;">[</span> <span style="color: #ff0000;">"recno"</span> <span style="color: #000000;">]</span> := RECNO<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">SQLRDD_hState</span><span style="color: #000000;">[</span> <span style="color: #ff0000;">"nKeyNo"</span> <span style="color: #000000;">]</span> := ::<span style="color: #000000;">SQLRDD_nKeyNo</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:17kmfbkh] |
xbrowse fwh2006 sqlrdd erro | Is the function OrdDescend() not supported by SQLRDD ? |
xbrowse fwh2006 sqlrdd erro | Intente con:
[code=fw:ika9507m]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />EXTERNAL DESCEND<br /><br />tubanco-><span style="color: #000000;">(</span> ORDDESCEND<span style="color: #000000;">(</span> , , .T.<span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> </div>[/code:ika9507m]
Saludos. |
xbrowse fwh2006 sqlrdd erro | I haven't detected the problem so far.
Yes, SQLRDD supports OrdDescend()
Anyway, without a self-contained example it is impossible to debug. |
xbrowse fwh2006 sqlrdd erro | OrdDescend() does not require the EXTERNAL DESCEND |
xbrowse fwh2006 sqlrdd erro | [quote="MOISES":nkk3tccu]I haven't detected the problem so far.
Yes, SQLRDD supports OrdDescend()
Anyway, without a self-contained example it is impossible to debug.[/quote:nkk3tccu]
In our tests, OrdDescend() is working well with SQLRDD.
Can some body explain to me the error in English? What does the error say? |
xbrowse fwh2006 sqlrdd erro | [url:nu8544c4]http://www.pctoledo.com.br/forum/download/file.php?id=383&sid=5325ef2eb76c463d6c3d9dd09229718c[/url:nu8544c4] |
xbrowse fwh2006 sqlrdd erro | Workarea not in use
EMG |
xbrowse fwh2006 sqlrdd erro | [quote="Enrico Maria Giordano":7oy0zc37]Workarea not in use
EMG[/quote:7oy0zc37]
Thank you very much.
That means the application program closed the dbf, even before xbrowse is destroyed. So, when the xbrowse got focus, the method KeyCount() is executed and the alias is not in use anymore.
Mr. Sistem
Can you please make this modification and try again?
[code=fw:7oy0zc37]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">METHOD</span> SQLRDD_SaveState<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TXBrowse<br /><br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">SQLRDD_hState</span> == <span style="color: #00C800;">nil</span><br /> ::<span style="color: #000000;">SQLRDD_hState</span> := <span style="color: #000000;">{</span>=><span style="color: #000000;">}</span><br /> HSetCaseMatch<span style="color: #000000;">(</span> ::<span style="color: #000000;">SQLRDD_hState</span>, .f. <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #00C800;">if</span> <span style="color: #0000ff;">SELECT</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /> ::<span style="color: #000000;">SQLRDD_hState</span><span style="color: #000000;">[</span> <span style="color: #ff0000;">"nLen"</span> <span style="color: #000000;">]</span> := ::<span style="color: #000000;">nLen</span><br /> ::<span style="color: #000000;">SQLRDD_hState</span><span style="color: #000000;">[</span> <span style="color: #ff0000;">"IndexOrd"</span> <span style="color: #000000;">]</span> := INDEXORD<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">SQLRDD_hState</span><span style="color: #000000;">[</span> <span style="color: #ff0000;">"descend"</span> <span style="color: #000000;">]</span> := OrdDescend<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// erro</span><br /> ::<span style="color: #000000;">SQLRDD_hState</span><span style="color: #000000;">[</span> <span style="color: #ff0000;">"recno"</span> <span style="color: #000000;">]</span> := RECNO<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">SQLRDD_hState</span><span style="color: #000000;">[</span> <span style="color: #ff0000;">"nKeyNo"</span> <span style="color: #000000;">]</span> := ::<span style="color: #000000;">SQLRDD_nKeyNo</span><br /> <span style="color: #00C800;">endif</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:7oy0zc37] |
xbrowse fwh2006 sqlrdd erro | fiz um video mostrado o erro. (acho que acontece o erro quando se tem um xbrowse aberto e abre outro e fechando em seguinda... não sei explicar, o video explica)
a correção não trabalha bem. trava o xbrowse
<!-- m --><a class="postlink" href="https://youtu.be/aDBEQd3Z53Y">https://youtu.be/aDBEQd3Z53Y</a><!-- m --> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.