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;">&#40;</span> oPreview <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aFiles &nbsp; := oPreview:<span style="color: #000000;">oDevice</span>:<span style="color: #000000;">aMeta</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oWord, oDoc, cEMF<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> Len<span style="color: #000000;">&#40;</span> aFiles <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> oWord := WinWordObj<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lWord &nbsp; &nbsp;:= .f.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MsgAlert<span style="color: #000000;">&#40;</span> FWString<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"MS Word not installed"</span> <span style="color: #000000;">&#41;</span>, FWString<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Alert"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oDoc = ToWordDocViaWriter<span style="color: #000000;">&#40;</span> oPreview, aFiles, <span style="color: #ff0000;">"W"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lWord &nbsp; &nbsp;:= .t.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oDoc = oWord:<span style="color: #000000;">Documents</span>:<span style="color: #000000;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> oDoc == <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MsgAlert<span style="color: #000000;">&#40;</span> FWString<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Failed to Create Word Document"</span> <span style="color: #000000;">&#41;</span>, FWString<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Alert"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDoc:<span style="color: #000000;">PageSetup</span>:<span style="color: #000000;">Orientation</span> := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oPreview:<span style="color: #000000;">oDevice</span>:<span style="color: #000000;">GetOrientation</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> == <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WITH OBJECT oDoc:<span style="color: #000000;">PageSetup</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">LeftMargin</span> &nbsp; &nbsp;:= <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">TopMargin</span> &nbsp; &nbsp; := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">RightMargin</span> &nbsp; := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">BottomMargin</span> &nbsp;:= <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; END<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">for</span> each cEMF in aFiles<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWord:<span style="color: #000000;">Selection</span>:<span style="color: #000000;">InlineShapes</span>:<span style="color: #000000;">AddPicture</span><span style="color: #000000;">&#40;</span> cEMF, .f., .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">next</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// oDoc:Application:Visible &nbsp; := .t.</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; MsgAlert<span style="color: #000000;">&#40;</span> FWString<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"There is no output for export"</span> <span style="color: #000000;">&#41;</span>, FWString<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Alert"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> oDoc<br />&nbsp;</div>[/code:3etlyb1q]
oActiveX:Do(""Stop"") No me funciona
Antonio:Este es el codigo que no me funciona el oActiveX&#058;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&#058;Do("Stop")Return(.F.) //--------------------------------------------------//Static Function DoXInProcs( oActiveX )LOCAL cPthFlsh :="C:\GL\Saludo.SWF"oActiveX&#058;Do( "LoadMovie", 0, cPthFlsh ) oActiveX&#058;Do( "Play" )Return NIL
oActiveX:Do(""Stop"") No me funciona
[quote="Ruben D. Fernandez":3k36w4vb]no me funciona el oActiveX&#058;Do("Stop")[/quote:3k36w4vb]Hola Rubén:Ya probaste con oActiveX&#058;End() ?Aquí te dejo un ejemplo funcionando:[code:3k36w4vb]#include "FiveWin&#46;ch" Function Main&#40;&#41; Local oWnd, oActiveX, oMenu MENU oMenu MENUITEM "Stop" ACTION oActiveX&#58;Do&#40; "Stop" &#41; MENUITEM "Play" ACTION oActiveX&#58;Do&#40; "Play" &#41; MENUITEM "End" ACTION oActiveX&#58;End&#40;&#41; ENDMENU DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support" MENU oMenu oActiveX = TActiveX&#40;&#41;&#58;New&#40; oWnd, "ShockwaveFlash&#46;ShockwaveFlash&#46;1" &#41; oActiveX&#58;Do&#40; "LoadMovie", 0, "c&#58;\fwh\samples\ball&#46;swf" &#41; ACTIVATE WINDOW oWnd ; ON INIT oActiveX&#58;Do&#40; "Play" &#41; Return Nil[/code:3k36w4vb]Saludos.Manuel Mercado
oActiveX:Do(""Stop"") No me funciona
Ruben,Prueba así:ACTIVATE DIALOG dbSplshIni CENTER ; VALID ( oActiveX&#058;Do("Stop"), .T. )
oActiveX:bOnEvent
Hello, I have been doing some test wit IE and activex and have had problem using oActiveX&#058;bOnEvent I get Message not found: TACTIVEX&#058;_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;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; ? GETURL<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://www.emagsoftware.it/gratis.htm"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <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;">&#40;</span> cUrl <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">LOCAL</span> cFile := <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span> cUrl, RAT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"/"</span>, cUrl <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">LOCAL</span> oUrl, oCli<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">LOCAL</span> lOk := .F.<br /><br />&nbsp; &nbsp; BEGIN SEQUENCE<br />&nbsp; &nbsp; &nbsp; &nbsp; oUrl = TUrl<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cUrl <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> EMPTY<span style="color: #000000;">&#40;</span> oUrl <span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">BREAK</span>; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; oCli = TIPClientHttp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oUrl <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> EMPTY<span style="color: #000000;">&#40;</span> oCli <span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">BREAK</span>; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> !oCli:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">BREAK</span>; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> !oCli:<span style="color: #000000;">ReadToFile</span><span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">BREAK</span>; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; lOk = <span style="color: #ff0000;">"OK"</span> $ UPPER<span style="color: #000000;">&#40;</span> oCli:<span style="color: #000000;">cReply</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; oCli:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> !lOk; FERASE<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; END SEQUENCE<br /><br />&nbsp; &nbsp; <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&#058;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;">&#40;</span> cSql <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> FW_ArrayToDBF<span style="color: #000000;">&#40;</span> aData, cFieldList <span style="color: #000000;">&#41;</span><br />&nbsp;</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;">&#123;</span>|| <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"clicked "</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</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;">&#40;</span><span style="color: #000000;">&#41;</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;">&#40;</span> WS_TABSTOP, .F. <span style="color: #000000;">&#41;</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 &#40;oBrw&#58;Refresh&#40;&#46;T&#46;&#41;&#41;[/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&#58;//www&#46;cbati&#46;com/TEST1&#46;jpg[/img:2103i1i9] [img:2103i1i9]http&#58;//www&#46;cbati&#46;com/TEST2&#46;jpg[/img:2103i1i9] [code:2103i1i9] #include "FiveWin&#46;ch" #include "xbrowse&#46;ch" function MAIN&#40;&#41; LOCAL AADBF &#58;= &#123;&#125;, ; I &#58;= 0, ; OBRW REQUEST DBFCDX Rddsetdefault&#40; "DBFCDX" &#41; ERASE &#40;"TEST&#46;DBF"&#41; ERASE &#40;"TEST&#46;CDX"&#41; aADBF &#58;= &#123;&#125; AADD&#40;aADBF, &#123;"NAME", "C", 40, 0 &#125;&#41; AADD&#40;aADBF, &#123;"NUMID", "N", 06, 0 &#125;&#41; DBCREATE&#40;"TEST", aADBF&#41; USE TEST NEW INDEX ON NUMID TAG "NUMID" INDEX ON NAME TAG "NAME" TEST->&#40;ORDSETFOCUS&#40;"NAME"&#41;&#41; FOR I = 1 TO 100 APPEND BLANK REPLACE TEST->NUMID WITH I REPLACE TEST->NAME WITH "NAME" + STR&#40;I,3&#41; NEXT TEST->&#40;DBGOTOP&#40;&#41;&#41; DEFINE WINDOW oWnd FROM 0,0 TO 23,78 oBrw &#58;= TXBrowse&#40;&#41;&#58;New&#40; oWnd &#41; oBrw&#58;bClrStd &#58;= &#123;|| &#123; CLR_BLUE, CLR_WHITE &#125; &#125; oCol&#58;=oBrw&#58;AddCol&#40;&#41; oCol&#58;bStrData&#58;= &#123;|| TEST->NAME &#125; oCol&#58;cHeader &#58;= "Name" ocol&#58;nWidth &#58;= 200 oCol&#58;bEditvalue &#58;= &#123; || TEST->NAME &#125; oCol&#58;nEditType &#58;= EDIT_GET oCol&#58;bonPostEdit &#58;= &#123; | oCol, uValue, nLastKey | If&#40; nLastKey == 13, &#40;TEST->NAME &#58;= uValue , obrw&#58;refresh&#40;&#41;&#41;, nil &#41; &#125; oBrw&#58;nMarqueeStyle &#58;= MARQSTYLE_HIGHLCELL oBrw&#58;nColDividerStyle &#58;= LINESTYLE_BLACK oBrw&#58;nRowDividerStyle &#58;= LINESTYLE_BLACK oBrw&#58;lColDividerComplete &#58;= &#46;t&#46; oBrw&#58;SetRDD&#40;&#41; oBrw&#58;bBookMark &#58;= &#123;| n | iif&#40; n == nil,TEST->&#40;RecNo&#40;&#41;&#41;, TEST->&#40;dbgoto&#40;n&#41;&#41; &#41; &#125; // Required! oBrw&#58;CreateFromCode&#40;&#41; ownd&#58;oClient &#58;= oBrw ACTIVATE WINDOW OWND TEST->&#40;DBCLOSEAREA&#40;&#41;&#41; ERASE &#40;"TEST&#46;DBF"&#41; ERASE &#40;"TEST&#46;CDX"&#41; 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 &#58;= TXBrowse&#40;&#41;&#58;New&#40; oWnd &#41; oBrw&#58;bClrStd &#58;= &#123;|| &#123; CLR_BLUE, CLR_WHITE &#125; &#125; oCol&#58;=oBrw&#58;AddCol&#40;&#41; oCol&#58;bStrData&#58;= &#123;|| TEST->NAME &#125; oCol&#58;cHeader &#58;= "Name" ocol&#58;nWidth &#58;= 200 oCol&#58;bEditvalue &#58;= &#123; || TEST->NAME &#125; oCol&#58;nEditType &#58;= EDIT_GET oCol&#58;cSortOrder &#58;= "NAME" oCol&#58;bonPostEdit &#58;= &#123; | oCol, uValue, nLastKey | If&#40; nLastKey == 13, &#40;TEST->NAME &#58;= uValue , obrw&#58;refresh&#40;&#41;&#41;, nil &#41; &#125; &#40;TEST->NAME &#58;= uValue &#41;, nil &#41; &#125; oBrw&#58;SetRDD&#40;&#41; //oBrw&#58;bBookMark &#58;= &#123;| n | iif&#40; n == nil,TEST->&#40;RecNo&#40;&#41;&#41;, TEST->&#40;dbgoto&#40;n&#41;&#41; &#41; &#125; // 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 &#58;= oBrw&#58;aCols&#91; 1 &#93; oCol&#58;nEditType &#58;= EDIT_GET oCol&#58;bonPostEdit &#58;= &#123; | oCol, uValue, nLastKey | If&#40; nLastKey == 13, ; &#40;TEST->NAME &#58;= uValue , obrw&#58;refresh&#40;&#41;&#41;, nil &#41; &#125; [/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&#58;//img155&#46;imageshack&#46;us/my&#46;php?image=srn1kw2&#46;jpg:v1zf3ys4][img:v1zf3ys4]http&#58;//img155&#46;imageshack&#46;us/img155/8742/srn1kw2&#46;th&#46;jpg[/img:v1zf3ys4][/url:v1zf3ys4] After Edit [url=http&#58;//img155&#46;imageshack&#46;us/my&#46;php?image=scrn2kr8&#46;jpg:v1zf3ys4][img:v1zf3ys4]http&#58;//img155&#46;imageshack&#46;us/img155/2716/scrn2kr8&#46;th&#46;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&#58;//imageshack&#46;us:1ha8qvh3][img:1ha8qvh3]http&#58;//img227&#46;imageshack&#46;us/img227/7263/scrn3ah8&#46;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&#58;aCols&#91; 1 &#93;&#58;nEditType &#58;= 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 />&nbsp;REPORT oReport <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">" "</span>,cTITLE+<span style="color: #ff0000;">" &nbsp; "</span>+ dtoc<span style="color: #000000;">&#40;</span>anfang<span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">" - "</span>+dtoc<span style="color: #000000;">&#40;</span>ende<span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">" "</span> &nbsp;<span style="color: #0000ff;">LEFT</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">FONT</span> &nbsp; oFont1,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oFont2,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oFont3 ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PEN oPen1;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HEADER Setup<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">LizenzNehmer</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">" "</span>, ALLTRIM<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Erstellt: "</span> + dtoc<span style="color: #000000;">&#40;</span>date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>+ <span style="color: #ff0000;">" - "</span>+time<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">RIGHT</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FOOTER <span style="color: #ff0000;">"Seite "</span> + Str<span style="color: #000000;">&#40;</span>oReport:<span style="color: #000000;">nPage</span>,<span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">RIGHT</span> PREVIEW<br />&nbsp;</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;">&#40;</span> cTitle, lPreview, lModal, <span style="color: #000000;">&#123;</span> |oRep,oBrw,n| RepSetup<span style="color: #000000;">&#40;</span> oRep, oBrw, n <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />...<br />...<br /><br /><span style="color: #00C800;">function</span> RepSetup<span style="color: #000000;">&#40;</span> oRep, oBrw, n <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oRep:<span style="color: #000000;">bPostEnd</span> := <span style="color: #000000;">&#123;</span> || MyRepPostEnd<span style="color: #000000;">&#40;</span> oRep <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</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;">&#40;</span> oRep <span style="color: #000000;">&#41;</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 />&nbsp;</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;">&#40;</span> oRep <span style="color: #000000;">&#41;</span><br /><br />oRep:<span style="color: #000000;">oFooter</span>:<span style="color: #000000;">aLine</span> := Str<span style="color: #000000;">&#40;</span>oRep:<span style="color: #000000;">nPage</span>,<span style="color: #000000;">3</span><span style="color: #000000;">&#41;</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;">&#40;</span> <span style="color: #ff0000;">"INTEST"</span> .t., <span style="color: #00C800;">nil</span>, <span style="color: #000000;">&#123;</span> |oRep,oBrw,n| RepSetup<span style="color: #000000;">&#40;</span> oRep, oBrw, n <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> , <span style="color: #00C800;">nil</span><span style="color: #000000;">&#41;</span><br /><br />*-----------------------------------------------------------------------------------<br /><span style="color: #00C800;">function</span> RepSetup<span style="color: #000000;">&#40;</span> oRep, oBrw, n <span style="color: #000000;">&#41;</span><br /><br />   oRep:<span style="color: #000000;">oFooter</span> := TrLine<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span>|| <span style="color: #ff0000;">"Page : "</span>+Str<span style="color: #000000;">&#40;</span>oRep:<span style="color: #000000;">nPage</span>,<span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>, oRep, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</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;">&#40;</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;">&#41;</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;">" &nbsp; "</span>+ dtoc<span style="color: #000000;">&#40;</span>anfang<span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">" - "</span>+dtoc<span style="color: #000000;">&#40;</span>ende<span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">" "</span> &nbsp;<span style="color: #0000ff;">LEFT</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">FONT</span> &nbsp; oFont1,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oFont2,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oFont3 ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PEN oPen1;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HEADER Setup<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">LizenzNehmer</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">" "</span>, ALLTRIM<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Erstellt: "</span> + dtoc<span style="color: #000000;">&#40;</span>date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>+ <span style="color: #ff0000;">" - "</span>+time<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">RIGHT</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FOOTER <span style="color: #ff0000;">"Page "</span> + Str<span style="color: #000000;">&#40;</span>oReport:<span style="color: #000000;">nPage</span>,<span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">RIGHT</span> PREVIEW<br />&nbsp;</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 />&nbsp; oCol:<span style="color: #000000;">bStrData</span> := <span style="color: #000000;">&#123;</span>||IIF<span style="color: #000000;">&#40;</span>VALTYPE<span style="color: #000000;">&#40;</span>oCol:<span style="color: #000000;">Value</span><span style="color: #000000;">&#41;</span>==<span style="color: #ff0000;">"A"</span> , <span style="color: #ff0000;">"{...}"</span> , oCol:<span style="color: #000000;">Value</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />END<br />&nbsp;</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&#58;//www&#46;mag071&#46;com/fwh/preview&#46;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;">&#40;</span>dbSetFilter<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span>|| Prod->Mfa_Prod=<span style="color: #ff0000;">"A"</span> .and. Prod->At1_Prod=<span style="color: #ff0000;">"A"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /> Prod-><span style="color: #000000;">&#40;</span>DbGoTop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</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;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bLClickHeader</span> := <span style="color: #000000;">&#123;</span>|| oBrw:<span style="color: #000000;">Seek</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">cFilterFld</span> := <span style="color: #ff0000;">"produto"</span> <span style="color: #000000;">&#125;</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;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oBrw, oFont, nWild := <span style="color: #000000;">2</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cList, aFlds, aHdrs<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nChoice, uDataSource<br /><br />&nbsp; &nbsp;SET DATE ITALIAN<br />&nbsp; &nbsp;SET CENTURY <span style="color: #0000ff;">ON</span><br />&nbsp; &nbsp;RDDSETDEFAULT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;cList := <span style="color: #ff0000;">"First,Last,Street,State,HireDate"</span><br /><br />&nbsp; &nbsp;nChoice &nbsp; &nbsp; := ALERT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Choose Data Souce"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"DBF"</span>, <span style="color: #ff0000;">"ADO"</span>, <span style="color: #ff0000;">"ARRAY"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;uDataSource := OpenData<span style="color: #000000;">&#40;</span> nChoice, cList <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<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 />&nbsp; &nbsp;<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 />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"XBrowse Incremental Filters"</span><br /><br />&nbsp; &nbsp;aFlds := aHdrs := HB_ATokens<span style="color: #000000;">&#40;</span> cList, <span style="color: #ff0000;">','</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nChoice == <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; aFlds := Array<span style="color: #000000;">&#40;</span> Len<span style="color: #000000;">&#40;</span> aFlds <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; AEval<span style="color: #000000;">&#40;</span> aFlds, <span style="color: #000000;">&#123;</span> |u,i| aFlds<span style="color: #000000;">&#91;</span> i <span style="color: #000000;">&#93;</span> := i <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;@ <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 />&nbsp; &nbsp; &nbsp; COLUMNS aFlds HEADERS aHdrs ;<br />&nbsp; &nbsp; &nbsp; DATASOURCE uDataSource AUTOSORT CELL LINES NOBORDER<br /><br />&nbsp; &nbsp;WITH OBJECT oBrw<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lIncrFilter</span> &nbsp; := .t.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lSeekWild</span> &nbsp; &nbsp; := <span style="color: #000000;">&#40;</span> nWild == <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">cFilterFld</span> &nbsp; &nbsp;:= <span style="color: #ff0000;">"FIRST"</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nStretchCol</span> &nbsp; := STRETCHCOL_WIDEST<br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bLClickHeader</span> := <span style="color: #000000;">&#123;</span> || oBrw:<span style="color: #000000;">Seek</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</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;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;@ <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 />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ITEMS</span> aHdrs ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">Seek</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; <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 />&nbsp; &nbsp;@ <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;">&#123;</span> <span style="color: #ff0000;">"Starting With"</span>, <span style="color: #ff0000;">"Containing"</span> <span style="color: #000000;">&#125;</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">lSeekWild</span> := <span style="color: #000000;">&#40;</span> nWild == <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">Seek</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">lSeekWild</span>, oBrw:<span style="color: #000000;">cSeek</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; <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 />&nbsp; &nbsp;@ <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 />&nbsp; &nbsp; &nbsp; <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 />&nbsp; &nbsp;oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<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;">&#40;</span> oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, .f. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<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;">&#40;</span> nSource, cList <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oCn, uSource<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">SWITCH</span> nSource<br />&nbsp; &nbsp;<span style="color: #00C800;">CASE</span> <span style="color: #000000;">1</span><br />&nbsp; &nbsp;<span style="color: #00C800;">CASE</span> <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; USE CUSTOMER SHARED <span style="color: #00C800;">NEW</span> <span style="color: #0000ff;">ALIAS</span> CUST<br />&nbsp; &nbsp; &nbsp; SET ORDER <span style="color: #0000ff;">TO</span> TAG FIRST<br />&nbsp; &nbsp; &nbsp; GO TOP<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> nSource == <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;uSource &nbsp;:= CUST-><span style="color: #000000;">&#40;</span> FW_DbfToArray<span style="color: #000000;">&#40;</span> cList <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CLOSE CUST<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;uSource &nbsp;:= <span style="color: #ff0000;">"CUST"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; EXIT<br />&nbsp; &nbsp;<span style="color: #00C800;">CASE</span> <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; oCn &nbsp; := FW_OpenAdoConnection<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cFilePath<span style="color: #000000;">&#40;</span> GetModuleFileName<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"xbrtest.mdb;User Id=admin;Password=;"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> oCn != <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;uSource &nbsp;:= FW_OpenRecordSet<span style="color: #000000;">&#40;</span> oCn, <span style="color: #ff0000;">"CUSTOMER"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; EXIT<br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span><br />&nbsp; &nbsp; &nbsp; QUIT<br />&nbsp; &nbsp;END<br /><br /><span style="color: #00C800;">return</span> uSource<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br />&nbsp;</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] &#46;&#46;&#46; &#46;&#46;&#46; Local oDlg, oLbx1, oBtn1, aFont oFont1 &#58;= TFont&#40;&#41;&#58;New&#40;"Arial", ,-12,&#46;F&#46;,&#46;T&#46; , , , ,&#46;F&#46;&#41; // The Array 9 Rows and 5 Cols // ---------------------------------------- PRIVAT aTEST&#91;9&#93;&#91;5&#93; aTEST&#91;1&#93; &#58;= &#123; " 1", "Test1", "Test1", "Test1", "Test1" &#125; aTEST&#91;2&#93; &#58;= &#123; " 2", "Test2", "Test2", "Test2", "Test2" &#125; aTEST&#91;3&#93; &#58;= &#123; " 3", "Test3", "Test3", "Test3", "Test3" &#125; aTEST&#91;4&#93; &#58;= &#123; " 4", "Test4", "Test4", "Test4", "Test4" &#125; aTEST&#91;5&#93; &#58;= &#123; " 5", "Test5", "Test5", "Test5", "Test5" &#125; aTEST&#91;6&#93; &#58;= &#123; " 6", "Test6", "Test6", "Test6", "Test6" &#125; aTEST&#91;7&#93; &#58;= &#123; " 7", "Test7", "Test7", "Test7", "Test7" &#125; aTEST&#91;8&#93; &#58;= &#123; " 8", "Test8", "Test8", "Test8", "Test8" &#125; aTEST&#91;9&#93; &#58;= &#123; " 9", "Test9", "Test9", "Test9", "Test9" &#125; // xBrowse // COLOR1 and COLOR2 are two Colors for different Row-colors // ---------------------------------------------------------------------------------- oLbx1 &#58;= TXBrowse&#40;&#41;&#58;New&#40; oDlg &#41; oLbx1&#58;nMarqueeStyle &#58;= MARQSTYLE_HIGHLROW oLbx1&#58;nColDividerStyle &#58;= LINESTYLE_BLACK oLbx1&#58;nRowDividerStyle &#58;= LINESTYLE_BLACK oLbx1&#58;SetArray&#40; aTEST &#41; oLbx1&#58;lVScroll &#58;= &#46;T&#46; oLbx1&#58;lHScroll &#58;= &#46;F&#46; oLbx1&#58;lFooter &#58;= &#46;T&#46; // Define alternating row colors // ------------------------------------- oLbx1&#58;bClrStd &#58;= &#123;|| IF &#40; EVAL &#40; oLbx1&#58;bKeyno, NIL, oLbx1 &#41; %2 == 0, ; &#123; CLR_BLACK, COLOR1 &#125;, &#123; CLR_BLACK, COLOR2 &#125; &#41; &#125; for nFor &#58;= 1 to Fcount&#40;&#41; oLbx1&#58;aCols&#91; nFor &#93;&#58;cHeader &#58;= Padr&#40;"Font 1", 11&#41; oLbx1&#58;aCols&#91; nFor &#93;&#58;oDataFont = oFont1 next // From Resource ID-no 110 // ----------------------------------- oLbx1&#58;CreateFromResource&#40; 110 &#41; // Start No // ---------- nNO &#58;= 9 // Send a new Array-element to oLbx1 with a button // --------------------------------------------------------- REDEFINE BUTTONBMP oBtn1 ID 270 OF oDlg1 ; ACTION &#40; nNO++, cTest &#58;= "Test" + LTRIM&#40; str&#40;nNO&#41; &#41;, ; AADD&#40; aTEST, &#123; LTRIM&#40; STR&#40;nNO&#41; &#41;, cTest, cTest, cTest, cTest &#125; &#41;, ; oLbx1&#58;Gobottom&#40;&#41;, oLbx1&#58;Refresh&#40;&#41; &#41; ; BITMAP "color_5" PROMPT " &Add Array" TEXTRIGHT oBtn&#58;cToolTip = &#123; "Add 1 Array-Element to Browser 1", ; "Add Array", 1, CLR_BLACK, 14089979 &#125; [/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&#40; oWnd &#41; *----------------------------------------------- local oChild, oBrw Local oDlgn, oDbfc, oBrwc local nRecNo &#58;= RecNo&#40;&#41; local new_rec &#58;= 0 local oGet local i&#58;=0 local oCombo1&#58;= Space&#40; 10 &#41; local oCombo2&#58;= Space&#40; 8 &#41; local oCombo3&#58;= Space&#40; 6 &#41; local oCombo4&#58;= Space&#40; 20 &#41; local oCombo5&#58;= Space&#40; 8 &#41; local V_MC_serial&#58;= Space&#40; 7 &#41; local nFor local bFilter &#58;= "" local cFilter &#58;= "" local x &#58;= "" *local nWidth&#58;=120 *local nHeight&#58;=40 REQUEST ADS rddRegister&#40; "ADS", 1 &#41; rddsetdefault&#40; "ADS" &#41; AdsSetDeleted&#40;&#46;T&#46;&#41; SET SERVER LOCAL SET FILETYPE TO CDX x &#58;= "'9855564'" cFilter &#58;= "me_mc_serl = "+ x bFilter = "&#123;||"+cFilter+"&#125;" SELECT 4 use mete index mete2 GO TOP DEFINE DIALOG oDlgn FROM 1,1 TO 30,120 TITLE "Dialog Meter Works" oBrw &#58;= TXBrowse&#40;&#41;&#58;New&#40; oDlgn &#41; oBrw&#58;nMarqueeStyle &#58;= MARQSTYLE_HIGHLCELL oBrw&#58;nColDividerStyle &#58;= LINESTYLE_BLACK oBrw&#58;nRowDividerStyle &#58;= LINESTYLE_BLACK oBrw&#58;lColDividerComplete &#58;= &#46;t&#46; oBrw&#58;nHeaderLines &#58;= 1 oBrw&#58;nFooterLines &#58;= 1 oBrw&#58;nDataLines &#58;= 1 oBrw&#58;lFooter &#58;= &#46;t&#46; oBrw&#58;SetRDD&#40;&#41; oBrw&#58;SetSize&#40; 20, 20 &#41; for nFor &#58;= 1 to Fcount&#40;&#41; if nFor=20 oBrw&#58;aCols&#91; nFor &#93;&#58;cHeader &#58;= FieldName&#40; nFor &#41; oBrw&#58;aCols&#91; nFor &#93;&#58;cFooter &#58;= alltrim&#40;STR&#40;TOTALEM2&#40;&#41;,12,0&#41;&#41; loop endif oBrw&#58;aCols&#91; nFor &#93;&#58;cHeader &#58;= FieldName&#40; nFor &#41; oBrw&#58;aCols&#91; nFor &#93;&#58;cFooter &#58;= FieldName&#40; nFor &#41; next @ 9, 1 BUTTON "&New" OF oDlgn SIZE 40, 12 //ACTION Editmach&#40; oLbx, &#46;t&#46; &#41; @ 9, 8 BUTTON "&Modify" OF oDlgn SIZE 40, 12 //ACTION Editmach&#40; oLbx, &#46;f&#46; &#41; @ 9, 15 BUTTON "&Delete" OF oDlgn SIZE 40, 12 //ACTION Delrecord&#40; oLbx &#41; @ 9, 22 BUTTON "&Search" OF oDlgn SIZE 40, 12 //ACTION Seekmach&#40; oLbx &#41; @ 9, 29 BUTTON "&Print" OF oDlgn ; SIZE 40, 12; ACTION oBrw&#58;Report&#40; "Machines Report", &#46;t&#46; &#41; ; // &#46;t&#46; --> wants preview @ 9, 36 BUTTON "&Exit" OF oDlgn ACTION oDlgn&#58;End&#40;&#41; SIZE 40, 12 @ 10, 1 BUTTON "&Order" OF oDlgn SIZE 40, 12 //ACTION ordermach&#40;oLbx&#41; @ 10, 8 BUTTON "&Filter" OF oDlgn SIZE 40, 12 //ACTION metefilter&#40;oLbx&#41; @ 10, 15 BUTTON "&Unfilter" OF oDlgn SIZE 40, 12 //ACTION filtermachNotOk&#40;oLbx&#41; oBrw&#58;SetSize&#40; 20, 20 &#41; oBrw&#58;CreateFromCode&#40;&#41; *oDlgn&#58;oClient &#58;= 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&#58;SetSize&#40; 20, 20 &#41;[/code:3qpp1zye] EMG
oBrw:SetSize() has no effect at all in TXBROWSE..please help
Thanks EnricoMaria It works