topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
---|---|
o que significa esse erro? | [quote="Sistem":23e9t458]karinha sempre recebo esse erro de um cliente ou de vários clientes não lembro.
karinha como assim existe mesmo? não entendi[/quote:23e9t458]
CONVERTTOWORDDOC(1904) // ??? O que tem nesta área?
De onde vem este "item" e qual é versão do word? talvez uma simples atualização, resolva. |
o que significa esse erro? | acredito que o CONVERTTOWORDDOC seja da classe TPREVIEW. esse erro acontece quando clica em exportar para word(acho) no preview do relatório |
o que significa esse erro? | Verifique, se o RPREVIEW.PRG, é desta versão do FWH que usas. Verifique se o Word.exe está instalado e qual é a versão do word.exe.
Verifique se é windows de 64 bits e se for, verifique o caminho(path) do Word.exe no windows de 64 bits. Pode ser isto.
Abs.
Saludos - saudações. |
o que significa esse erro? | [code=fw:3etlyb1q]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> ConvertToWordDoc<span style="color: #000000;">(</span> oPreview <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> aFiles := oPreview:<span style="color: #000000;">oDevice</span>:<span style="color: #000000;">aMeta</span><br /> <span style="color: #00C800;">local</span> oWord, oDoc, cEMF<br /><br /> <span style="color: #00C800;">if</span> Len<span style="color: #000000;">(</span> aFiles <span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /> <span style="color: #00C800;">if</span> <span style="color: #000000;">(</span> oWord := WinWordObj<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> == <span style="color: #00C800;">nil</span><br /> lWord := .f.<br /> MsgAlert<span style="color: #000000;">(</span> FWString<span style="color: #000000;">(</span> <span style="color: #ff0000;">"MS Word not installed"</span> <span style="color: #000000;">)</span>, FWString<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Alert"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> oDoc = ToWordDocViaWriter<span style="color: #000000;">(</span> oPreview, aFiles, <span style="color: #ff0000;">"W"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">else</span><br /> lWord := .t.<br /> oDoc = oWord:<span style="color: #000000;">Documents</span>:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> oDoc == <span style="color: #00C800;">nil</span><br /> MsgAlert<span style="color: #000000;">(</span> FWString<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Failed to Create Word Document"</span> <span style="color: #000000;">)</span>, FWString<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Alert"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">else</span><br /> oDoc:<span style="color: #000000;">PageSetup</span>:<span style="color: #000000;">Orientation</span> := <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oPreview:<span style="color: #000000;">oDevice</span>:<span style="color: #000000;">GetOrientation</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> == <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> WITH OBJECT oDoc:<span style="color: #000000;">PageSetup</span><br /> :<span style="color: #000000;">LeftMargin</span> := <span style="color: #000000;">0</span><br /> :<span style="color: #000000;">TopMargin</span> := <span style="color: #000000;">0</span><br /> :<span style="color: #000000;">RightMargin</span> := <span style="color: #000000;">0</span><br /> :<span style="color: #000000;">BottomMargin</span> := <span style="color: #000000;">0</span><br /> END<br /> <span style="color: #00C800;">for</span> each cEMF in aFiles<br /> oWord:<span style="color: #000000;">Selection</span>:<span style="color: #000000;">InlineShapes</span>:<span style="color: #000000;">AddPicture</span><span style="color: #000000;">(</span> cEMF, .f., .t. <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">next</span><br /> <span style="color: #B900B9;">// oDoc:Application:Visible := .t.</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">else</span><br /> MsgAlert<span style="color: #000000;">(</span> FWString<span style="color: #000000;">(</span> <span style="color: #ff0000;">"There is no output for export"</span> <span style="color: #000000;">)</span>, FWString<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Alert"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> oDoc<br /> </div>[/code:3etlyb1q] |
oActiveX:Do(""Stop"") No me funciona | Antonio:Este es el codigo que no me funciona el oActiveX:Do("Stop")Código de Raymundo Islas.(Gracias Raymundo)FUNCTION FLASHINTRO()LOCAL oActiveXDEFINE DIALOG dbSplshIni RESOURCE "SALUDO" REDEFINE ACTIVEX oActiveX ; ID 110 ; PROGID "ShockwaveFlash.ShockwaveFlash.1" ; OF dbSplshIni dbSplshIni:bStart := { || DoXInProcs( oActiveX ) }dbSplshIni:lHelpIcon := .F.ACTIVATE DIALOG dbSplshIni CENTER oActiveX:Do("Stop")Return(.F.) //--------------------------------------------------//Static Function DoXInProcs( oActiveX )LOCAL cPthFlsh :="C:\GL\Saludo.SWF"oActiveX:Do( "LoadMovie", 0, cPthFlsh ) oActiveX:Do( "Play" )Return NIL |
oActiveX:Do(""Stop"") No me funciona | [quote="Ruben D. Fernandez":3k36w4vb]no me funciona el oActiveX:Do("Stop")[/quote:3k36w4vb]Hola Rubén:Ya probaste con oActiveX:End() ?Aquí te dejo un ejemplo funcionando:[code:3k36w4vb]#include "FiveWin.ch"
Function Main()
Local oWnd, oActiveX, oMenu
MENU oMenu
MENUITEM "Stop" ACTION oActiveX:Do( "Stop" )
MENUITEM "Play" ACTION oActiveX:Do( "Play" )
MENUITEM "End" ACTION oActiveX:End()
ENDMENU
DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support" MENU oMenu
oActiveX = TActiveX():New( oWnd, "ShockwaveFlash.ShockwaveFlash.1" )
oActiveX:Do( "LoadMovie", 0, "c:\fwh\samples\ball.swf" )
ACTIVATE WINDOW oWnd ;
ON INIT oActiveX:Do( "Play" )
Return Nil[/code:3k36w4vb]Saludos.Manuel Mercado |
oActiveX:Do(""Stop"") No me funciona | Ruben,Prueba así:ACTIVATE DIALOG dbSplshIni CENTER ; VALID ( oActiveX:Do("Stop"), .T. ) |
oActiveX:bOnEvent | Hello,
I have been doing some test wit IE and activex
and have had problem using
oActiveX:bOnEvent
I get
Message not found: TACTIVEX:_BONEVENT
Any suggestions?
Thanks
[/code] |
oActiveX:bOnEvent | Dave,
You are probably linking Class TActiveX from xharbour commercial, instead of FWH Class TActiveX |
oActiveX:bOnEvent | Antonio,
Is it possible that the cause is due to being on an older version?
Mine looks like November 2004.
Thanks |
oActiveX:bOnEvent | Dave,
> Mine looks like November 2004
xharbour and FWH ? If so, yes, its quite old |
oActiveX:bOnEvent | Antonio,
Thanks, I will be looking to upgrade soon. |
oActivex navigate2 | Could someone show me how to save the content of a internet page to a variable.
Thanks in advance
Otto |
oActivex navigate2 | This is a working sample:
[code=fw:192i1twe]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> ? GETURL<span style="color: #000000;">(</span> <span style="color: #ff0000;">"http://www.emagsoftware.it/gratis.htm"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> GETURL<span style="color: #000000;">(</span> cUrl <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> cFile := <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">(</span> cUrl, RAT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"/"</span>, cUrl <span style="color: #000000;">)</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oUrl, oCli<br /><br /> <span style="color: #00C800;">LOCAL</span> lOk := .F.<br /><br /> BEGIN SEQUENCE<br /> oUrl = TUrl<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> cUrl <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> EMPTY<span style="color: #000000;">(</span> oUrl <span style="color: #000000;">)</span>; <span style="color: #00C800;">BREAK</span>; <span style="color: #00C800;">ENDIF</span><br /><br /> oCli = TIPClientHttp<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oUrl <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> EMPTY<span style="color: #000000;">(</span> oCli <span style="color: #000000;">)</span>; <span style="color: #00C800;">BREAK</span>; <span style="color: #00C800;">ENDIF</span><br /><br /> <span style="color: #00C800;">IF</span> !oCli:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>; <span style="color: #00C800;">BREAK</span>; <span style="color: #00C800;">ENDIF</span><br /><br /> <span style="color: #00C800;">IF</span> !oCli:<span style="color: #000000;">ReadToFile</span><span style="color: #000000;">(</span> cFile <span style="color: #000000;">)</span>; <span style="color: #00C800;">BREAK</span>; <span style="color: #00C800;">ENDIF</span><br /><br /> lOk = <span style="color: #ff0000;">"OK"</span> $ UPPER<span style="color: #000000;">(</span> oCli:<span style="color: #000000;">cReply</span> <span style="color: #000000;">)</span><br /><br /> oCli:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> !lOk; FERASE<span style="color: #000000;">(</span> cFile <span style="color: #000000;">)</span>; <span style="color: #00C800;">ENDIF</span><br /> END SEQUENCE<br /><br /> <span style="color: #00C800;">RETURN</span> lOk</div>[/code:192i1twe]
EMG |
oActivex navigate2 | Hello Enrico,
thank you for your help.
Should your code also work on a password protected page.
Is cFile the content of the page.
Thanks in advance
Otto |
oActivex navigate2 | Hello Enrico,
Thank you again. With trial and error I found out how to do.
If someone is interested:
oDoc := oActiveX:GetProp( "Document" )
oText := oDoc:GET("body" )
msginfo( oText:GET("innerText" ))
Best regards,
Otto |
oAuth 2.0 Restful Web Service | Is it possible to access a WebService using oAuth 2.0 from fivewin using CreateObject( "MSXML2.XmlHttp" ), I have been connecting with Carbonite using what seems to be a similar technique. I am attempting to access On-Site.com using their API's. There is some code to generate a Key and I believe this key is good for quite a while, whereas the Carbonite key needed to be generated every hour.
Sample code:
oHttp := CreateObject( "MSXML2.XmlHttp" )
hLogin["email" ] := "[email protected]"
hLogin["password"] := "MyPassword"
cLogin := hb_JsonEncode( hLogin )
oHttp:Open( "POST","https:" + "/" + "/" + "api.carbonite.com:443/api/auth/login",.f. )
oHttp:SetRequestHeader( "Content-Type", "text/json" )
oHttp:Send( cLogin )
If oHttp:status == 200
cResponse := oHttp:ResponseText()
Logit( Mcs_AppPath() + "Request.txt",cResponse )
Else
MsgStop( "Status:" + oHttp:statusText,"Request Failed" )
Endif |
oAuth 2.0 Restful Web Service | Dear Byron,
what result do you get ? |
oAuth 2.0 Restful Web Service | Antonio,
This works Great, I guess I am going to try it, but I saw somebody posted using oAuth 2.0 and they utilized curl, which I am not familiar with, so I was hoping this would work. I have used this technique with Authorize.net as well. For each request the API describes what the result will look like.
I downloaded the oAuth specs and it's not a pretty read.
Thanks,
Byron .. |
oAuth2 | Hi All
Does anybody know if this feature is available in Harbour.
Regards
Colin |
oAuth2 | Colin,
I have googled for it related to Harbour and found nothing. Nothing also in the Harbour devel groups, and nothing in the Harbour full sources.
Anyhow if you search in google, you can find several examples using other languages, so probably there is a way to implement it also from Harbour. |
oAuth2 | Hi Antonio
Yes I googled and could not find anything - I integrate my software with accounting packages using ODBC but
they are now changing to oAuth2 plus xml for integration.
Regards
Colin |
oAuth2 | Hi Antonio
This example PHP and library CURL, and CURL is under Harbour;
<!-- m --><a class="postlink" href="https://www.elance.com/q/api2/examples/oauth/php">https://www.elance.com/q/api2/examples/oauth/php</a><!-- m -->
Regards |
oBD:SaveToDbf() | Is possible appending records in a table that already exist using this method ? How? |
oBD:SaveToDbf() | Not possible.
Instead, you can do this:
[code=fw:25gwoy73]<div class="fw" id="{CB}" style="font-family: monospace;"><br />cFieldList := <span style="color: #ff0000;">"code,name"</span><br />cSql := <span style="color: #ff0000;">"select "</span> + cFieldList + <span style="color: #ff0000;">" from table where cond"</span><br />aData := oCn:<span style="color: #000000;">Execute</span><span style="color: #000000;">(</span> cSql <span style="color: #000000;">)</span><br /><span style="color: #000000;">(</span> cAlias <span style="color: #000000;">)</span>-><span style="color: #000000;">(</span> FW_ArrayToDBF<span style="color: #000000;">(</span> aData, cFieldList <span style="color: #000000;">)</span><br /> </div>[/code:25gwoy73] |
oBD:SaveToDbf() | Thanks <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) --> |
oBRW:ToExcel() works only with character columns? | I try to use oBRW:TOEXCEL() method to export the content of my xbrowse in a xls file.I note that it works fine only if i specify all columns as "character" expression.If i put just one column as a "numeric" expression in my xbrowse, i receive this error at runtime: "Error Excel.Application:ACTIVESHEET:COLUMNS/0 S_OK: _STYLE" and my application quit.Is it normal?There is another more stable / powerful way for export the content of my xbrowse in a xls file? Thank you.Max |
oBRW:ToExcel() works only with character columns? | Works for all types of columns perfectly for Excel English installation. We are noticing some problems with other language installations We are addressing this issue.. |
oBRW:ToExcel() works only with character columns? | Thank you, Antonio.Let me know when you have a solution or something i can try for this issue.Max |
oBRW:ToExcel() works only with character columns? | I'm quite interested in this - are there any examples of :ToExcel() anywhere?RegardsPete |
oBRW:ToExcel() works only with character columns? | You can find examples in mallorca.prg and testxbr3.prg in \FWH\SAMPLES.Max |
oBRW:report() : problemi con i records deleted?? | Utilizzando oBRW:report() su un normalissimo XBROWSE sul quale ho dei record cancellati logicamente e non visibili nell'xbrowse avendo impostato "SET DELETE ON", mi vengono fuori in stampa un numero di records pari al numero di records totale inclusi quelli cancellati.La stampa sembra non si fermi in coda, ripetendo più volte l'ultimo record valido fino al raggiungimento del numero di record totale.Esempio, posto che ho 5 record di cui il terzo e il quarto cancellati:REC.1 "PIPPO"REC.2 "PLUTO"REC.3 "TOPOLINO" (deleted)REC.4 "BINGO" (deleted)REC.5 "BONGO", nell'xbrowse vedo solo i 3 record attivi, mentre se vado con il report() la stampa mi viene fuori così:"PIPPO""PLUTO""BONGO""BONGO" (riga in più)"BONGO" (riga in più)Se faccio il pack dell'archivio tutto torna a posto.C'è un buco o qualche impostazione ulteriore che devo dare per gestire correttamente i records deleted anche su report()?FWH 8.04 + XHARBOUR 1.1.0 |
oBRW:report() : problemi con i records deleted?? | Ho risolto aggiungendo "for ! deleted()" alla index on che ricostruisce l'indice collegato, e sempre lasciando la SET DELETED ON.In questo modo la oBRW:report() legge il giusto numero di record. |
oBarGet on xbrowse header | Hello everyone!
1. Is it possible to have a button or a series of buttons on the header of an xbrowse column?
2. I tried to add a button to the get object on the header of an xbrowse but I get a runtime error. I'm guessing the get object hasn't been instantiated until :CreateFromCode() is executed.
[code=fw:ge9myjsz]<div class="fw" id="{CB}" style="font-family: monospace;"><br />...<br /> :<span style="color: #000000;">nHeaderHeight</span> := <span style="color: #000000;">40</span> <br /> :<span style="color: #000000;">lGetBar</span> := .t.<br /> :<span style="color: #000000;">oCol</span>:<span style="color: #000000;">oBarGet</span>:<span style="color: #000000;">bAction</span> := <span style="color: #000000;">{</span>|| <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"clicked "</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">oCol</span>:<span style="color: #000000;">oBarGet</span>:<span style="color: #000000;">cBmpName</span> := <span style="color: #ff0000;">"SEARCH16"</span><br /> :<span style="color: #000000;">oCol</span>:<span style="color: #000000;">oBarGet</span>:<span style="color: #000000;">cCueText</span> := <span style="color: #ff0000;">"Filtered ManagerID"</span><br /> </div>[/code:ge9myjsz]
[quote:ge9myjsz]
Error occurred at: 12/06/2017, 19:45:21
Error description: Error BASE/1005 No exported variable: BACTION
Args:
[ 1] = U
[ 2] = B {|| ... }
[/quote:ge9myjsz]
Any Ideas?
Reinaldo. |
oBarGet on xbrowse header | Hello,
I think you need to call [code=fw:6fjej704]<div class="fw" id="{CB}" style="font-family: monospace;">:<span style="color: #000000;">oCol</span>:<span style="color: #000000;">CreateBarGet</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span></div>[/code:6fjej704] before access it... |
oBarGet on xbrowse header | Mr Reinaldo
As of now, this is not possible.
[quote:35ebhp31]
2. I tried to add a button to the get object on the header of an xbrowse but I get a runtime error. I'm guessing the get object hasn't been instantiated until :CreateFromCode() is executed.
[/quote:35ebhp31]
oBarGets are created during execution of oBrw:Adjust() by calling an "internal" method oCol:CreateBarGet(). WIKI clearly lists this as one of the internal methods.
oBrw:Adjust() method is executed in oBrw:CreateFromCode() in case of browses on windows and ON INIT in case of browses on Dialogs.
After oBrw:Adjust() is executed, oBarGets of the specified columns are created but now it is too late to add button and bAction, because we need to do this at the time of creation of Get. |
oBarGet on xbrowse header | [quote="nageswaragunupudi":d1gngkoq]oBarGets are created during execution of oBrw:Adjust() by calling an "internal" method oCol:CreateBarGet(). WIKI clearly lists this as one of the internal methods.[/quote:d1gngkoq]
Just for curiosity, why is it not declared as hidden ? |
oBarGet on xbrowse header | Yes, we could have declared this method as protected. |
oBarGet on xbrowse header | [quote="nageswaragunupudi":2p926lx3]Mr Reinaldo
After oBrw:Adjust() is executed, oBarGets of the specified columns are created but now it is too late to add button and bAction, because we need to do this at the time of creation of Get.[/quote:2p926lx3]
I suppose it wouldn't be too complicated to add a couple of new DATA to the column object so that bAction and cbitmap to be used with the TGet object be declared before it is created. I will do it on my end while it gets added to xbrowse.
Reinaldo. |
oBarGet on xbrowse header | yes |
oBarGet on xbrowse header | Provided in 17.12. |
oBro:EditSource() vs. oBro:Edit() | hi,
when use Excel File Type "C" will have LEN = 255
oBro:EditSource() will display Type "C" as "single line"
oBro:Edit() will display Type "C" as "multi line"
when type into oBro:EditSource() Type "C" it make Problem with German Umlaute
you can use "single Umlaut" like "München" but not "Müü" ( 2nd Umlaute follow 1st )
when type into oBro:Edit() Type "C" you can type all without Problem
Question : "when" to use oBro:EditSource() <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
p.s. as Parameter are same i can easy check it <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> |
oBrowse:bSeek and TAB | hi,
when "TAB" (from other Control) into XBROWSE it will "activate Seek" but not bSeek Codeblock itself
how can i avoid "Seek" without type any Sign (a-z, 0-9) <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> |
oBrowse:bSeek and TAB | When XBrowse gets focus by whatever way, browse is refreshed and no seek is executed.
Seek is activated only by a kay-stroke and not in any other way. |
oBrowse:bSeek and TAB | hi,
Thx for Answer.
just can say when press "TAB" to get to next TGET
when got to XBROWSE it "change" Display ...
have not figure out yet "what" is shown (only 1 Record)
p.s. still happens even when use
[code=fw:3l8jv5u2]<div class="fw" id="{CB}" style="font-family: monospace;"> oBrw:<span style="color: #000000;">SetStyle</span><span style="color: #000000;">(</span> WS_TABSTOP, .F. <span style="color: #000000;">)</span></div>[/code:3l8jv5u2] |
oBrowse:bSeek and TAB | [quote:25hccw09]when got to XBROWSE it "change" Display ...
[/quote:25hccw09]
When XBrowse receives focus, the browse is refreshed. That means, if there is any change in the data, the current data is displayed. |
oBrw:KeyCount() inexacto (SOLUCIONADO) | Hola amigos,
Bajo xBrowse uso oBrw:KeyCount() para indicarle al usuario el numero de lineas que incluye la lista que esta viendo que incluye algunos filtros, sinembargo a veces no coincide el valor que me arroja oBrw:KeyCount() con el numero de lineas que realmente me esta mostrando. Por ejemplo, oBrw:KeyCount() me da 49 y si cuento fisicamente las lineas o si las cuento usando DBSKIP(1) en un DO WHILE !EOF() son solo 45.
A alguien le ha sucedido algo similar? |
oBrw:KeyCount() inexacto (SOLUCIONADO) | oBrw:KeyCount() returns the result of OrdKeyCount().
By default, OrdKeyCount() includes deleted records also.
To get the correct number of records, excluding deleted records, we should include "!DELETED()" in the filter condition.
Example:
USE CUSTOMER
? OrdKeyCount() --> Number of all records including deleted records.
SET FILTER TO !DELETED()
GO TOP
? OrdKeyCount() --> Number of all records excluding deleted records.
If we want the oBrw:KeyCount(), oBrw:KeyNo() to work precisely, we need to SET FILTER TO !DELETED().
If we set some other filter like SET FILTER TO AGE > 30, then we should SET FILTER TO AGE > 30 .AND. !DELETED(). |
oBrw:KeyCount() inexacto (SOLUCIONADO) | Now it works! Thanks!!! |
oBrw:Refresh(.T.) don't refresh new record | Dear All,
[code:a615vz1m]
DEFINE TIMER oTimer OF oWnd INTERVAL 5000 ACTION (oBrw:Refresh(.T.))[/code:a615vz1m]
I use oBrw:Refresh( .T. ) for refresh new record but when I enter the new record, it doesn't show on the Browse.
oBrw:Refresh( .T. ) = :Upstable() ? When the new record append, should it show on the Browse?
Regards,
Dutch |
oBrw:Refresh(.T.) don't refresh new record | Dutch
Try obrw:gobottom() before obrw:refresh(.t.) and make sure you have
oBrw:bBookMark := {| n | iif( n == nil,(MYALIAS)->(RecNo()), (MYALIAS)->(dbgoto(n)) ) } // Required!
anyway when using rdd, xbrowse refresh is still buggy and not performing as expected, i will post a sample today that shows the problem.
Richard |
oBrw:Refresh(.T.) don't refresh new record | Antonio,
Can you please take a look at the sample below
i join 2 images that show the problem, still refresh has bad painting
Refresh(.t.) will force the record to be first on the list qnd redraw the whole page which is not always what we want to do.
Thanks for help
Richard
fwh 8.03
[img:2103i1i9]http://www.cbati.com/TEST1.jpg[/img:2103i1i9]
[img:2103i1i9]http://www.cbati.com/TEST2.jpg[/img:2103i1i9]
[code:2103i1i9]
#include "FiveWin.ch"
#include "xbrowse.ch"
function MAIN()
LOCAL AADBF := {}, ;
I := 0, ;
OBRW
REQUEST DBFCDX
Rddsetdefault( "DBFCDX" )
ERASE ("TEST.DBF")
ERASE ("TEST.CDX")
aADBF := {}
AADD(aADBF, {"NAME", "C", 40, 0 })
AADD(aADBF, {"NUMID", "N", 06, 0 })
DBCREATE("TEST", aADBF)
USE TEST NEW
INDEX ON NUMID TAG "NUMID"
INDEX ON NAME TAG "NAME"
TEST->(ORDSETFOCUS("NAME"))
FOR I = 1 TO 100
APPEND BLANK
REPLACE TEST->NUMID WITH I
REPLACE TEST->NAME WITH "NAME" + STR(I,3)
NEXT
TEST->(DBGOTOP())
DEFINE WINDOW oWnd FROM 0,0 TO 23,78
oBrw := TXBrowse():New( oWnd )
oBrw:bClrStd := {|| { CLR_BLUE, CLR_WHITE } }
oCol:=oBrw:AddCol()
oCol:bStrData:= {|| TEST->NAME }
oCol:cHeader := "Name"
ocol:nWidth := 200
oCol:bEditvalue := { || TEST->NAME }
oCol:nEditType := EDIT_GET
oCol:bonPostEdit := { | oCol, uValue, nLastKey | If( nLastKey == 13, (TEST->NAME := uValue , obrw:refresh()), nil ) }
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLCELL
oBrw:nColDividerStyle := LINESTYLE_BLACK
oBrw:nRowDividerStyle := LINESTYLE_BLACK
oBrw:lColDividerComplete := .t.
oBrw:SetRDD()
oBrw:bBookMark := {| n | iif( n == nil,TEST->(RecNo()), TEST->(dbgoto(n)) ) } // Required!
oBrw:CreateFromCode()
ownd:oClient := oBrw
ACTIVATE WINDOW OWND
TEST->(DBCLOSEAREA())
ERASE ("TEST.DBF")
ERASE ("TEST.CDX")
return nil
[/code:2103i1i9] |
oBrw:Refresh(.T.) don't refresh new record | Thanks Richard,
I'll try your recommend.
Regards,
Dutch |
oBrw:Refresh(.T.) don't refresh new record | Mr Richard
I am testing your program and I am not facing any problem here. The edited value is correctly shown at the right place and browse painted correctly. I have already downloaded 8.04 but I think 8.04 and 8.03 may not be much different.
Refresh( .t. )'s intended behavior is to GoTop. Normally we should use Refresh only. We should use Refresh(.t.) when we want gotop also.
>
oBrw:bBookMark := {| n | iif( n == nil,TEST->(RecNo()), TEST->(dbgoto(n)) ) } // Required!
>
Actually this is not necessary. SetRDD assigns exactly the same code block to :bBookMark. Assigning it once again in our code is only a duplication.
Am I missing anything? Can you tell me how to reproduce your problem? |
oBrw:Refresh(.T.) don't refresh new record | Mr NageswaraRao
I am just editing at line name 8 and replacing the 8 with 3a value then enter, i can reproduce the problem every time. I am using standard fwh 8.03 and standard xbrowse from fwh not modified. Maybe your copy of xbrowse is different ?
Would you mind building the sample with standard xbrowse from fwh and let me know if you get the same result ? I have not yet installed fwh 8.04 (planned this week end) but as you said i guess there should not be a difference in xbrowse.
Thank you for your help
Richard |
oBrw:Refresh(.T.) don't refresh new record | Mr Richard
>
I am just editing at line name 8 and replacing the 8 with 3a value then enter,
>
Yes this is what I have done. I always use FWH original code only for this forum postings. I have used 8.04 and now tested by linking with 8.03 xbrowse prg. both give me the same results.
You said you can not reproduce the problem always. So I shall also keep a watch and if this happens occassionally to me. It appears lot of improvement has been made recently in this area recently. |
oBrw:Refresh(.T.) don't refresh new record | Mr NageswaraRao
This is very strange. I reproduce the problem everytime.
In fact the problem appears everytime you try to set a lower key than your current one, i mean a key that should be displayed before.
What happens is the new line is diplayed at the proper place and at the previous line also which is bad.
in my sequence i had 1 , 2 ,34,5,6,7,8,9...
i replace 8 with 3a i should have 1,2,3,3a,4,5,6,7,9....
the 7 is replaced with 3a also this is causing the bad refresh
I hope i made it clear, did you try to set a lower key ? in case of a upper key that will force the page to change, refresh is OK
I agree that xbrowse has made a lot of improvements.
Thanks for the help,
Richard |
oBrw:Refresh(.T.) don't refresh new record | Mr Richard
>
n fact the problem appears everytime you try to set a lower key than your current one, i mean a key that should be displayed before.
>
Yes. I have done that only. I have no issues
Anyway now i shall complie with 8.03 xbrowse code "once again". I shall get back in a few minutes |
oBrw:Refresh(.T.) don't refresh new record | You are right.
With 8.03 I confirm your problem.
With 8.04 this is solved. |
oBrw:Refresh(.T.) don't refresh new record | Incidentally I would also like to share with you how the new commands have simplified the coding.
Your earlier code
[code:3dzs4xlk]
oBrw := TXBrowse():New( oWnd )
oBrw:bClrStd := {|| { CLR_BLUE, CLR_WHITE } }
oCol:=oBrw:AddCol()
oCol:bStrData:= {|| TEST->NAME }
oCol:cHeader := "Name"
ocol:nWidth := 200
oCol:bEditvalue := { || TEST->NAME }
oCol:nEditType := EDIT_GET
oCol:cSortOrder := "NAME"
oCol:bonPostEdit := { | oCol, uValue, nLastKey | If( nLastKey == 13, (TEST->NAME := uValue , obrw:refresh()), nil ) }
(TEST->NAME := uValue ), nil ) }
oBrw:SetRDD()
//oBrw:bBookMark := {| n | iif( n == nil,TEST->(RecNo()), TEST->(dbgoto(n)) ) } // Required! // NOT REQUIRED
[/code:3dzs4xlk]
This can now be written as
[code:3dzs4xlk]
@ 0,0 XBROWSE oBrw COLUMNS "Name" ALIAS "TEST" COLOR CLR_BLUE,CLR_WHITE
oCol := oBrw:aCols[ 1 ]
oCol:nEditType := EDIT_GET
oCol:bonPostEdit := { | oCol, uValue, nLastKey | If( nLastKey == 13, ;
(TEST->NAME := uValue , obrw:refresh()), nil ) }
[/code:3dzs4xlk]
We get the same functionality
When you download 8.04 the present problem may not be there |
oBrw:Refresh(.T.) don't refresh new record | Thank you for taking time to test the problem
I am happy to know that this issue is solved in fwh 8.04, i will install this version today and report back
The new syntax is quite nice, i have used it also (not all of it since there are new commands in there)
Thanks again and best regards
Richard |
oBrw:Refresh(.T.) don't refresh new record | Mr Richard
With 8.04
Before edit
[url=http://img155.imageshack.us/my.php?image=srn1kw2.jpg:v1zf3ys4][img:v1zf3ys4]http://img155.imageshack.us/img155/8742/srn1kw2.th.jpg[/img:v1zf3ys4][/url:v1zf3ys4]
After Edit
[url=http://img155.imageshack.us/my.php?image=scrn2kr8.jpg:v1zf3ys4][img:v1zf3ys4]http://img155.imageshack.us/img155/2716/scrn2kr8.th.jpg[/img:v1zf3ys4][/url:v1zf3ys4]
I hope this is what we want. Am I right ? |
oBrw:Refresh(.T.) don't refresh new record | Mr NageswaraRao
You are right, this is the correct behaviour
Though i will test and try to place at another line than first to see that there are no painting problems something in between 2 or 3 for instance
Richard |
oBrw:Refresh(.T.) don't refresh new record | Mr Richard
Please see this
[url=http://imageshack.us:1ha8qvh3][img:1ha8qvh3]http://img227.imageshack.us/img227/7263/scrn3ah8.jpg[/img:1ha8qvh3][/url:1ha8qvh3]
Is this okay ? |
oBrw:Refresh(.T.) don't refresh new record | Mr NageswaraRao
Yes this is exactly what we would expect
Richard |
oBrw:Refresh(.T.) don't refresh new record | Mr Richard
Working with XBrowse 8.04 I found out more.
This is the only code that is needed:
[code:1r8wjpts]
@ 0,0 XBROWSE oBrw COLUMNS "Name" SORT "NAME" ALIAS "TEST" COLOR CLR_BLUE,CLR_WHITE
oBrw:aCols[ 1 ]:nEditType := EDIT_GET
[/code:1r8wjpts]
Even bOnPostEdit is provided by default. We do not have to write the PostEdit block unless we want more complex operation.
Another interesting thing is now xbrowse will automaticall decide whether it has to refresh the row only or the entire browse depending on whether we edited a sorted column or other column. So it is not even necessary for us to write obrw:Refesh().
When you download 8.04, please try replacing all the code with the above two lines only. |
oBrw:Refresh(.T.) don't refresh new record | Mr NageswaraRao
I have installed and tested with fwh 8.04
The refresh problem is ok now
the new syntax is not working for me , i get an error message
Error occurred at: 04/14/08, 13:32:00
Error description: Error BASE/1005 Message not found: TXBRWCOLUMN:_CSORTODER
Stack Calls
===========
Called from: tobject.prg => TXBRWCOLUMN:ERROR(172)
Called from: tobject.prg => TXBRWCOLUMN:MSGNOTFOUND(205)
Called from: tobject.prg => TXBRWCOLUMN:_CSORTODER(0)
Called from: XBROWSE.PRG => XBROWSENEW(0)
Called from: test2.prg => MAIN(34)
Richard |
oBrw:Refresh(.T.) don't refresh new record | Richard,
Please download 8.04 again. Sorry for the inconveniencies, thanks |
oBrw:Report | hi
can I get any example to add page on the bottom of oBrw:Report ?
thank you
--------------------------------------------------
FiveWin for xHarbour 12.01 - Jan. 2012 xHarbour development power
(c) FiveTech, 1993-2012 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7 |
oBrw:Report | [code=fw:y2cndvkf]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> REPORT oReport <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">" "</span>,cTITLE+<span style="color: #ff0000;">" "</span>+ dtoc<span style="color: #000000;">(</span>anfang<span style="color: #000000;">)</span>+<span style="color: #ff0000;">" - "</span>+dtoc<span style="color: #000000;">(</span>ende<span style="color: #000000;">)</span>,<span style="color: #ff0000;">" "</span> <span style="color: #0000ff;">LEFT</span> ;<br /> <span style="color: #0000ff;">FONT</span> oFont1,;<br /> oFont2,;<br /> oFont3 ;<br /> PEN oPen1;<br /> HEADER Setup<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">LizenzNehmer</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,<span style="color: #ff0000;">" "</span>, ALLTRIM<span style="color: #000000;">(</span><span style="color: #ff0000;">"Erstellt: "</span> + dtoc<span style="color: #000000;">(</span>date<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>+ <span style="color: #ff0000;">" - "</span>+time<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">RIGHT</span>;<br /> FOOTER <span style="color: #ff0000;">"Seite "</span> + Str<span style="color: #000000;">(</span>oReport:<span style="color: #000000;">nPage</span>,<span style="color: #000000;">3</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">RIGHT</span> PREVIEW<br /> </div>[/code:y2cndvkf]
Best regards,
Otto |
oBrw:Report | [code=fw:1hze4gt4]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw:<span style="color: #000000;">Report</span><span style="color: #000000;">(</span> cTitle, lPreview, lModal, <span style="color: #000000;">{</span> |oRep,oBrw,n| RepSetup<span style="color: #000000;">(</span> oRep, oBrw, n <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br />...<br />...<br /><br /><span style="color: #00C800;">function</span> RepSetup<span style="color: #000000;">(</span> oRep, oBrw, n <span style="color: #000000;">)</span><br /><br /> oRep:<span style="color: #000000;">bPostEnd</span> := <span style="color: #000000;">{</span> || MyRepPostEnd<span style="color: #000000;">(</span> oRep <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;">function</span> MyRepPostEnd<span style="color: #000000;">(</span> oRep <span style="color: #000000;">)</span><br /><br />< your code <span style="color: #0000ff;">to</span> add <span style="color: #0000ff;">page</span> <span style="color: #00C800;">at</span> the end <span style="color: #0000ff;">of</span> report ><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:1hze4gt4] |
oBrw:Report | thank you mr Rao
is this correct?
[code=fw:3jipfoz6]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> MyRepPostEnd<span style="color: #000000;">(</span> oRep <span style="color: #000000;">)</span><br /><br />oRep:<span style="color: #000000;">oFooter</span>:<span style="color: #000000;">aLine</span> := Str<span style="color: #000000;">(</span>oRep:<span style="color: #000000;">nPage</span>,<span style="color: #000000;">3</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:3jipfoz6] |
oBrw:Report | [quote:3nnjtug4]can I get any example to add page on the bottom of oBrw:Report ?
[/quote:3nnjtug4]
If you mean page numbers at the bottom of each page, oBrw:Report() method automatically prints page numbers at the bottom of each page. You do not need to do anything. |
oBrw:Report | hi mr Rao
with this code I get page number:
[code=fw:h4q04f46]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">Report</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"INTEST"</span> .t., <span style="color: #00C800;">nil</span>, <span style="color: #000000;">{</span> |oRep,oBrw,n| RepSetup<span style="color: #000000;">(</span> oRep, oBrw, n <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> , <span style="color: #00C800;">nil</span><span style="color: #000000;">)</span><br /><br />*-----------------------------------------------------------------------------------<br /><span style="color: #00C800;">function</span> RepSetup<span style="color: #000000;">(</span> oRep, oBrw, n <span style="color: #000000;">)</span><br /><br /> oRep:<span style="color: #000000;">oFooter</span> := TrLine<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><span style="color: #000000;">{</span>|| <span style="color: #ff0000;">"Page : "</span>+Str<span style="color: #000000;">(</span>oRep:<span style="color: #000000;">nPage</span>,<span style="color: #000000;">3</span><span style="color: #000000;">)</span><span style="color: #000000;">}</span> <span style="color: #000000;">}</span>, oRep, <span style="color: #000000;">3</span> <span style="color: #000000;">)</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:h4q04f46]
and with this code, no:
[code=fw:h4q04f46]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">Report</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"INTEST"</span> .t., <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span><span style="color: #000000;">)</span></div>[/code:h4q04f46] |
oBrw:Report | Hello,
have you tired to use FOOTER when defining the report.
Best regards,
Otto
[code=fw:2v93h0bt]<div class="fw" id="{CB}" style="font-family: monospace;">REPORT oReport <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">" "</span>,cTITLE+<span style="color: #ff0000;">" "</span>+ dtoc<span style="color: #000000;">(</span>anfang<span style="color: #000000;">)</span>+<span style="color: #ff0000;">" - "</span>+dtoc<span style="color: #000000;">(</span>ende<span style="color: #000000;">)</span>,<span style="color: #ff0000;">" "</span> <span style="color: #0000ff;">LEFT</span> ;<br /> <span style="color: #0000ff;">FONT</span> oFont1,;<br /> oFont2,;<br /> oFont3 ;<br /> PEN oPen1;<br /> HEADER Setup<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">LizenzNehmer</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,<span style="color: #ff0000;">" "</span>, ALLTRIM<span style="color: #000000;">(</span><span style="color: #ff0000;">"Erstellt: "</span> + dtoc<span style="color: #000000;">(</span>date<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>+ <span style="color: #ff0000;">" - "</span>+time<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">RIGHT</span>;<br /> FOOTER <span style="color: #ff0000;">"Page "</span> + Str<span style="color: #000000;">(</span>oReport:<span style="color: #000000;">nPage</span>,<span style="color: #000000;">3</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">RIGHT</span> PREVIEW<br /> </div>[/code:2v93h0bt] |
oBrw:Report | hi Otto
thank you for your reply.
I would like to use Report from XBROWSE.
this is my target.
I have my first dialog with e large Get
[code=fw:yacpd5e6]<div class="fw" id="{CB}" style="font-family: monospace;">@ <span style="color: #000000;">40</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> mGet MEMO <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">450</span>, <span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span></div>[/code:yacpd5e6]
in this get I insert a SQL istruction SELECT (some fields) FROM Table LEFT JOIN Table etc...)
then there is ADO connection and in 2nd dialog I have my XBROWSE With the chosen fields (Depends on the SELECT)
in this dialog I have BUTTON to export in EXCEL... ACTION (oBrw:ToExcel()) and BUTTON to print REPORT ACTION (oBrw:Report(...))
And I'd like to understand oBrw:Report parameters |
oBrw:Report | Hello,
I am sorry I didn't read you question well.
I never tried to configure oBrw:report myself.
Best regards,
Otto |
oBrw:Report error on memo field | Hello,
A memo field contains an array , i got an error in rcolumn line 43
METHOD LineCount() INLINE If( ::lMemo, MLCount( Trim( Eval( ::aData[ 1 ] ) ), ::nSize ), Len( ::aData ) )
Eval( ::aData[ 1 ] ) returns an array
probably the codeblock ::aData[1] should return e text (i.e. "Array") In MakeRepCol (xbrowse) , or we have to assign bStrData our self
Assigning bStrData doesn't solve the problem while bEditValue is assigned to ::aData[1]
[code=fw:mhqbn340]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">IF</span> oCol:<span style="color: #000000;">cDataType</span>==<span style="color: #ff0000;">"M"</span><br /> oCol:<span style="color: #000000;">bStrData</span> := <span style="color: #000000;">{</span>||IIF<span style="color: #000000;">(</span>VALTYPE<span style="color: #000000;">(</span>oCol:<span style="color: #000000;">Value</span><span style="color: #000000;">)</span>==<span style="color: #ff0000;">"A"</span> , <span style="color: #ff0000;">"{...}"</span> , oCol:<span style="color: #000000;">Value</span><span style="color: #000000;">)</span><span style="color: #000000;">}</span><br />END<br /> </div>[/code:mhqbn340]
In MakeRepCol :
if ( bData := oXCol:bEditValue ) == nil
bData := oXCol:bStrData
else
cPic := oXCol:cEditPicture
endif
Maybe is better :
if ( bData := oXCol:bStrData ) == nil
bData := oXCol:bEditValue
else
cPic := oXCol:cEditPicture
endif
This change solved the problem , but i don't understand why cpict is only assigned when bStrData (or bEditValue) is nil
Frank |
oBrw:Report error on memo field | there is also an error when we use supertitles on xbrowse |
oBrw:Report error on memo field | At present, memo fields containing arrays are not handled by the Report object. The enhancement is to be made in the Report class but not XBrowse.
This enhancement will be provided in the next version. |
oBrw:Report error on memo field | Printing of Arrays returned by Memo fields is provided in FWH 13.02
Even array values in a cell of xbrowse are shown as a list. |
oBrw:Report -Problema- | Saludos ,
Al momento en un xBrowse ejecutar un oBrw:Report()
me genera el siguiente error
[img:2br8v4kx]http://www.mag071.com/fwh/preview.png[/img:2br8v4kx]
Gracias de antemano. |
oBrw:Report -Problema- | Mario,
Comprueba si tienes permisos de escritura en esa carpeta |
oBrw:Report -Problema- | Antonio,
Agradecido como siempre, eso era,
permisos de escritura en la carpeta WINDOWS/TEMP. |
oBrw:Report setup SETPORTRAIT | the user can select lLandscape for the orientation of report
oBrw:Report( 'Test', , , ;
{ |oRep, oBrw | MySetUp( oRep, oBrw, lLandscape ) } )
MySetUp( oRep, oBrw, lLandscape )
If lLandscape
oRep:SetLanscape()
Else
oRep:SetPortrait()
endif
return nil
[b:2fl6ymae]How I can make to set the orientation of Report ?[/b:2fl6ymae] |
oBrw:Report() altura interlineado | Hola,
Con Xbrowse fijo la altura de cada fila con "oBrw:nRowHeight := ", como se hace para cambiar la altura de fila en el reporte que por defecto se genera a ulitizar oBrw:Report()
Gracias y saludos, |
oBrw:Report() height lines | Hi,
With Xbrowse fixed the height of each row with "oBrw: nRowHeight: =", as it is done to change the row height in the report that by default is generated to use
oBrw: Report()
Thanks, |
oBrw:Seek("""") deshace SetFilter | [code=fw:3d7tslvh]<div class="fw" id="{CB}" style="font-family: monospace;"> Prod-><span style="color: #000000;">(</span>dbSetFilter<span style="color: #000000;">(</span> <span style="color: #000000;">{</span>|| Prod->Mfa_Prod=<span style="color: #ff0000;">"A"</span> .and. Prod->At1_Prod=<span style="color: #ff0000;">"A"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> Prod-><span style="color: #000000;">(</span>DbGoTop<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;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">4</span>, <span style="color: #000000;">4</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">45</span>, <span style="color: #000000;">150</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Produtos"</span><br /> @ <span style="color: #000000;">2.7</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">xBROWSE</span> oBrw FIELDS p->Nom_Prod.... <br /> ...<span style="color: #0000ff;">of</span> oDlg <br /><br /> oBrw:<span style="color: #000000;">lIncrFilter</span> := .t.<br /> oBrw:<span style="color: #000000;">lSeekWild</span> := .t.<br /><br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">5</span><span style="color: #000000;">]</span>:<span style="color: #000000;">bLClickHeader</span> := <span style="color: #000000;">{</span>|| oBrw:<span style="color: #000000;">Seek</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span>, oBrw:<span style="color: #000000;">cFilterFld</span> := <span style="color: #ff0000;">"produto"</span> <span style="color: #000000;">}</span> </div>[/code:3d7tslvh]
// ao clic en la columna 5 [b:3d7tslvh]goodbye setfilter <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->[/b:3d7tslvh]
// Alguien sabe como solucionar? |
oBrw:Seek("""") deshace SetFilter | Mira se ayuda:
[code=fw:3o4siweb]<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 /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'hbcompat.ch'</span><br /><br />REQUEST DBFCDX<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</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, oFont, nWild := <span style="color: #000000;">2</span><br /> <span style="color: #00C800;">local</span> cList, aFlds, aHdrs<br /> <span style="color: #00C800;">local</span> nChoice, uDataSource<br /><br /> SET DATE ITALIAN<br /> SET CENTURY <span style="color: #0000ff;">ON</span><br /> RDDSETDEFAULT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">)</span><br /><br /> cList := <span style="color: #ff0000;">"First,Last,Street,State,HireDate"</span><br /><br /> nChoice := ALERT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Choose Data Souce"</span>, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"DBF"</span>, <span style="color: #ff0000;">"ADO"</span>, <span style="color: #ff0000;">"ARRAY"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> uDataSource := OpenData<span style="color: #000000;">(</span> nChoice, cList <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 /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">750</span>,<span style="color: #000000;">300</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont ;<br /> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"XBrowse Incremental Filters"</span><br /><br /> aFlds := aHdrs := HB_ATokens<span style="color: #000000;">(</span> cList, <span style="color: #ff0000;">','</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> nChoice == <span style="color: #000000;">3</span><br /> aFlds := Array<span style="color: #000000;">(</span> Len<span style="color: #000000;">(</span> aFlds <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> AEval<span style="color: #000000;">(</span> aFlds, <span style="color: #000000;">{</span> |u,i| aFlds<span style="color: #000000;">[</span> i <span style="color: #000000;">]</span> := i <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> @ <span style="color: #000000;">30</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;">-10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> COLUMNS aFlds HEADERS aHdrs ;<br /> DATASOURCE uDataSource AUTOSORT CELL LINES NOBORDER<br /><br /> WITH OBJECT oBrw<br /> :<span style="color: #000000;">lIncrFilter</span> := .t.<br /> :<span style="color: #000000;">lSeekWild</span> := <span style="color: #000000;">(</span> nWild == <span style="color: #000000;">2</span> <span style="color: #000000;">)</span><br /> :<span style="color: #000000;">cFilterFld</span> := <span style="color: #ff0000;">"FIRST"</span><br /> :<span style="color: #000000;">nStretchCol</span> := STRETCHCOL_WIDEST<br /> END<br /><br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">5</span><span style="color: #000000;">]</span>:<span style="color: #000000;">bLClickHeader</span> := <span style="color: #000000;">{</span> || oBrw:<span style="color: #000000;">Seek</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span>, oBrw:<span style="color: #000000;">cFilterFld</span> := <span style="color: #ff0000;">"Street"</span>, oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> @ <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">COMBOBOX</span> oBrw:<span style="color: #000000;">cFilterFld</span> ;<br /> <span style="color: #0000ff;">ITEMS</span> aHdrs ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">Seek</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">""</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 /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> @ <span style="color: #000000;">10</span>, <span style="color: #000000;">70</span> <span style="color: #0000ff;">COMBOBOX</span> nWild <span style="color: #0000ff;">ITEMS</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Starting With"</span>, <span style="color: #ff0000;">"Containing"</span> <span style="color: #000000;">}</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">lSeekWild</span> := <span style="color: #000000;">(</span> nWild == <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>, ;<br /> oBrw:<span style="color: #000000;">Seek</span><span style="color: #000000;">(</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">lSeekWild</span>, oBrw:<span style="color: #000000;">cSeek</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, ;<br /> oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">70</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> @ <span style="color: #000000;">11</span>,<span style="color: #000000;">160</span> <span style="color: #0000ff;">SAY</span> oBrw:<span style="color: #000000;">oSeek</span> <span style="color: #0000ff;">PROMPT</span> oBrw:<span style="color: #000000;">cSeek</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">COLOR</span> CLR_BLACK,CLR_YELLOW <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'@!'</span><br /><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> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .f. <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> OpenData<span style="color: #000000;">(</span> nSource, cList <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oCn, uSource<br /><br /> <span style="color: #00C800;">SWITCH</span> nSource<br /> <span style="color: #00C800;">CASE</span> <span style="color: #000000;">1</span><br /> <span style="color: #00C800;">CASE</span> <span style="color: #000000;">3</span><br /> USE CUSTOMER SHARED <span style="color: #00C800;">NEW</span> <span style="color: #0000ff;">ALIAS</span> CUST<br /> SET ORDER <span style="color: #0000ff;">TO</span> TAG FIRST<br /> GO TOP<br /> <span style="color: #00C800;">if</span> nSource == <span style="color: #000000;">3</span><br /> uSource := CUST-><span style="color: #000000;">(</span> FW_DbfToArray<span style="color: #000000;">(</span> cList <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> CLOSE CUST<br /> <span style="color: #00C800;">else</span><br /> uSource := <span style="color: #ff0000;">"CUST"</span><br /> <span style="color: #00C800;">endif</span><br /> EXIT<br /> <span style="color: #00C800;">CASE</span> <span style="color: #000000;">2</span><br /> oCn := FW_OpenAdoConnection<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="</span> + ;<br /> cFilePath<span style="color: #000000;">(</span> GetModuleFileName<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> + ;<br /> <span style="color: #ff0000;">"xbrtest.mdb;User Id=admin;Password=;"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> oCn != <span style="color: #00C800;">nil</span><br /> uSource := FW_OpenRecordSet<span style="color: #000000;">(</span> oCn, <span style="color: #ff0000;">"CUSTOMER"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> EXIT<br /> <span style="color: #00C800;">DEFAULT</span><br /> QUIT<br /> END<br /><br /><span style="color: #00C800;">return</span> uSource<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /> </div>[/code:3o4siweb]
|
oBrw:SetArray() differences beetween TCBrwose and XBrowse | Hi,
I am testing XBrowse to evaluate a migration from the standard TcBrowse FWH class.
The first (and most important difference - and problem -) I found is this:
if I make an array browse and I need to add another element I already added it nto the array to do then a symply oBrw:SetArray(aUpdatedArray).
There are no problem to do this with TCBrowse but XBrowse delete all the header and size informations.
I'm using the November 2007 Xbrowse class,
is this changed with this lastest xBrowse's updates or is there any turn-around ?
Thanks.
This is a sample code that show the problem:
#include "FiveWin.ch"
#include "tcbrowse.ch"
static oWnd
static oBrw,aArray
//----------------------------------------------------------------------------//
function Main()
DEFINE WINDOW oWnd TITLE "Testing Keys";
MENU BuildMenu();
MDI
ACTIVATE WINDOW oWnd
return nil
Function Test()
aArray:={}
aadd(aArray,{1,"Henry"})
oBrw := TXBrowse():New( oWnd:oWndClient )
oBrw:SetArray( aArray)
oBrw:aCols[1]:cHeader := "Num"
oBrw:aCols[2]:cHeader := "Name"
oBrw:lRecordSelector := .f.
oBrw:nLastEditCol:=3
oBrw:nFreeze:=1
oBrw:CreateFromCode()
oBrw:Move(5,5,200,200)
@ 14, 4 BUTTON "&Add row" SIZE 100,80 OF OWND:oWndClient;
ACTION AddRow()
return nil
function BuildMenu()
local oMenu
local cAction
MENU oMenu
MENUITEM "TEST";
ACTION TEST()
ENDMENU
RETURN(OMENU)
Function AddRow()
aadd(aArray,{len(aArray)+1,"Henry"})
oBrw:SetArray(aArray)
oBrw:Refresh()
return |
oBrw:SetArray() differences beetween TCBrwose and XBrowse | Hello Marco,
I'm just busy, to create a tool for xbrowse.
As i have seen your message, i added a function
for a array test.
There was no problem to add a element at runtime.
I try, to send you a sample today.
Regards
Uwe |
oBrw:SetArray() differences beetween TCBrwose and XBrowse | Thanks Uwe,
however my problem is not to add or change an element at runtime but the SetArray method that called at runtime to update the displayed array it delete the header and the others initial settings. |
oBrw:SetArray() differences beetween TCBrwose and XBrowse | Marco, I had the same problem:
<!-- m --><a class="postlink" href="http://fivetechsoft.com/forums/viewtopic.php?t=10244&highlight=array">http://fivetechsoft.com/forums/viewtopi ... ight=array</a><!-- m -->
Regards,
Otto |
oBrw:SetArray() differences beetween TCBrwose and XBrowse | Hello
Here is just a sample
[code:1k5e56mc]
...
...
Local oDlg, oLbx1, oBtn1, aFont
oFont1 := TFont():New("Arial", ,-12,.F.,.T. , , , ,.F.)
// The Array 9 Rows and 5 Cols
// ----------------------------------------
PRIVAT aTEST[9][5]
aTEST[1] := { " 1", "Test1", "Test1", "Test1", "Test1" }
aTEST[2] := { " 2", "Test2", "Test2", "Test2", "Test2" }
aTEST[3] := { " 3", "Test3", "Test3", "Test3", "Test3" }
aTEST[4] := { " 4", "Test4", "Test4", "Test4", "Test4" }
aTEST[5] := { " 5", "Test5", "Test5", "Test5", "Test5" }
aTEST[6] := { " 6", "Test6", "Test6", "Test6", "Test6" }
aTEST[7] := { " 7", "Test7", "Test7", "Test7", "Test7" }
aTEST[8] := { " 8", "Test8", "Test8", "Test8", "Test8" }
aTEST[9] := { " 9", "Test9", "Test9", "Test9", "Test9" }
// xBrowse
// COLOR1 and COLOR2 are two Colors for different Row-colors
// ----------------------------------------------------------------------------------
oLbx1 := TXBrowse():New( oDlg )
oLbx1:nMarqueeStyle := MARQSTYLE_HIGHLROW
oLbx1:nColDividerStyle := LINESTYLE_BLACK
oLbx1:nRowDividerStyle := LINESTYLE_BLACK
oLbx1:SetArray( aTEST )
oLbx1:lVScroll := .T.
oLbx1:lHScroll := .F.
oLbx1:lFooter := .T.
// Define alternating row colors
// -------------------------------------
oLbx1:bClrStd := {|| IF ( EVAL ( oLbx1:bKeyno, NIL, oLbx1 ) %2 == 0, ;
{ CLR_BLACK, COLOR1 }, { CLR_BLACK, COLOR2 } ) }
for nFor := 1 to Fcount()
oLbx1:aCols[ nFor ]:cHeader := Padr("Font 1", 11)
oLbx1:aCols[ nFor ]:oDataFont = oFont1
next
// From Resource ID-no 110
// -----------------------------------
oLbx1:CreateFromResource( 110 )
// Start No
// ----------
nNO := 9
// Send a new Array-element to oLbx1 with a button
// ---------------------------------------------------------
REDEFINE BUTTONBMP oBtn1 ID 270 OF oDlg1 ;
ACTION ( nNO++, cTest := "Test" + LTRIM( str(nNO) ), ;
AADD( aTEST, { LTRIM( STR(nNO) ), cTest, cTest, cTest, cTest } ), ;
oLbx1:Gobottom(), oLbx1:Refresh() ) ;
BITMAP "color_5" PROMPT " &Add Array" TEXTRIGHT
oBtn:cToolTip = { "Add 1 Array-Element to Browser 1", ;
"Add Array", 1, CLR_BLACK, 14089979 }
[/code:1k5e56mc]
In the xbrowse-tool, EVERYTHING !!! has to work at runtime.
Many things i had to do, are complete different to normal
programming.
I think. maybe at weekend, you can have a look at the xBrowse-tool.
It is a extra applicatión now.
It is complete new done with folders, to try different things
like color-, font, style-changes and much more.
Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
oBrw:SetArray() differences beetween TCBrwose and XBrowse | There have been lots of improvements in array browses in Xbrowse.
Simplest way is
@ 0,0 XBROWSE oBrw OF oWnd ARRAY aData [AUTOCOLS] [AUTOSORT]
AUTOCOLS adds all columns. AUTOSORT sets sort on columns.
If we want to add only selected columns, but not all columns :
@ 0,0 XBROWSE oBrw COLUMNS 5,4,3 HEADERS "Five","Four","Three" OF oWnd
The data can be any data type and we need not even convert them to character values.
After setting up the browse we can add any more columns either by command
ADD TO oBrw ARRAY ELEMENT 8 PICTURE "9999" HEADER "Eight"
[or ]
oCol := oBrw:AddCol()
oCol:nArrayCol := 8 // no need to define complex codeblocks
oCol:cEditPicture := "99999"
oCol:cHeader := "Eight"
The new command syntax enables reducing long complex coding to just a few lines. Also the command syntax is very similar to the well known LISTBOX syntax and TCColumn browse syntax making migration very fast and easy |
oBrw:SetArray() differences beetween TCBrwose and XBrowse | Yes, solved.
I only have to make an oBrw:Refresh() without a new SetArray to display the changes.
Thanks to all. |
oBrw:SetArray() differences beetween TCBrwose and XBrowse | [quote="Marco Turco":1sk21k7p]Yes, solved.
I only have to make an oBrw:Refresh() without a new SetArray to display the changes.
Thanks to all.[/quote:1sk21k7p]
Yes. SetArray should not be used again at any stage even in earlier versions of XBrowse |
oBrw:SetSize() has no effect at all in TXBROWSE..please help | That statement oBrw:SetSize( 20, 20 ) Antonio suggested to resize the dialog box has no effect at all on resizing the dialog . You can test it your self .
[code:2ivkemqd]
STATIC FUNCTION mete( oWnd )
*-----------------------------------------------
local oChild, oBrw
Local oDlgn, oDbfc, oBrwc
local nRecNo := RecNo()
local new_rec := 0
local oGet
local i:=0
local oCombo1:= Space( 10 )
local oCombo2:= Space( 8 )
local oCombo3:= Space( 6 )
local oCombo4:= Space( 20 )
local oCombo5:= Space( 8 )
local V_MC_serial:= Space( 7 )
local nFor
local bFilter := ""
local cFilter := ""
local x := ""
*local nWidth:=120
*local nHeight:=40
REQUEST ADS
rddRegister( "ADS", 1 )
rddsetdefault( "ADS" )
AdsSetDeleted(.T.)
SET SERVER LOCAL
SET FILETYPE TO CDX
x := "'9855564'"
cFilter := "me_mc_serl = "+ x
bFilter = "{||"+cFilter+"}"
SELECT 4
use mete index mete2
GO TOP
DEFINE DIALOG oDlgn FROM 1,1 TO 30,120 TITLE "Dialog Meter Works"
oBrw := TXBrowse():New( oDlgn )
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLCELL
oBrw:nColDividerStyle := LINESTYLE_BLACK
oBrw:nRowDividerStyle := LINESTYLE_BLACK
oBrw:lColDividerComplete := .t.
oBrw:nHeaderLines := 1
oBrw:nFooterLines := 1
oBrw:nDataLines := 1
oBrw:lFooter := .t.
oBrw:SetRDD()
oBrw:SetSize( 20, 20 )
for nFor := 1 to Fcount()
if nFor=20
oBrw:aCols[ nFor ]:cHeader := FieldName( nFor )
oBrw:aCols[ nFor ]:cFooter := alltrim(STR(TOTALEM2(),12,0))
loop
endif
oBrw:aCols[ nFor ]:cHeader := FieldName( nFor )
oBrw:aCols[ nFor ]:cFooter := FieldName( nFor )
next
@ 9, 1 BUTTON "&New" OF oDlgn SIZE 40, 12 //ACTION Editmach( oLbx, .t. )
@ 9, 8 BUTTON "&Modify" OF oDlgn SIZE 40, 12 //ACTION Editmach( oLbx, .f. )
@ 9, 15 BUTTON "&Delete" OF oDlgn SIZE 40, 12 //ACTION Delrecord( oLbx )
@ 9, 22 BUTTON "&Search" OF oDlgn SIZE 40, 12 //ACTION Seekmach( oLbx )
@ 9, 29 BUTTON "&Print" OF oDlgn ;
SIZE 40, 12;
ACTION oBrw:Report( "Machines Report", .t. ) ; // .t. --> wants preview
@ 9, 36 BUTTON "&Exit" OF oDlgn ACTION oDlgn:End() SIZE 40, 12
@ 10, 1 BUTTON "&Order" OF oDlgn SIZE 40, 12 //ACTION ordermach(oLbx)
@ 10, 8 BUTTON "&Filter" OF oDlgn SIZE 40, 12 //ACTION metefilter(oLbx)
@ 10, 15 BUTTON "&Unfilter" OF oDlgn SIZE 40, 12 //ACTION filtermachNotOk(oLbx)
oBrw:SetSize( 20, 20 )
oBrw:CreateFromCode()
*oDlgn:oClient := oBrw
ACTIVATE DIALOG oDlgn
RETURN NIL
[/code:2ivkemqd] |
oBrw:SetSize() has no effect at all in TXBROWSE..please help | Try
[code:3qpp1zye]ACTIVATE DIALOG oDlgn;
ON INIToBrw:SetSize( 20, 20 )[/code:3qpp1zye]
EMG |
oBrw:SetSize() has no effect at all in TXBROWSE..please help | Thanks EnricoMaria It works |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.