topic
stringlengths
1
63
text
stringlengths
1
577k
ACTIVEX ACCESS_VIOLATION
Tente assim: [code=fw:39ul31qf]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   FreeLibrary<span style="color: #000000;">&#40;</span>xDll<span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// LoadLibrary( xDLL ) // FWHX 32 bits.</span><br /> </div>[/code:39ul31qf] [code=fw:39ul31qf]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd ;<br />   <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">&#40;</span> oActiveX&#<span style="color: #000000;">058</span>;End<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, .T. <span style="color: #000000;">&#41;</span><br /> </div>[/code:39ul31qf]
ACTIVEX ACCESS_VIOLATION
João, Continua o mesmo problema - Na 1a vez funciona, da segunda pra frente o sistema cai gerando um HB_OUT.log
ACTIVEX ACCESS_VIOLATION
Se comento a chamada ao HB_GCALL() no DIALOG.PRG, resolve.
ACTIVEX ACCESS_VIOLATION
Teste assim agora: [code=fw:2wn5zyu2]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;HB_GCALL<span style="color: #000000;">&#40;</span> .F. <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// Limpia basura(lixo) somente(solo) se existir(ejistir)</span><br />&nbsp;</div>[/code:2wn5zyu2]
ACTIVEX ACCESS_VIOLATION
Dá o mesmo erro <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
ACTIVEX ACCESS_VIOLATION
Coloque então, antes do dialogo, ou depois que fechar o dialogo ou janela. Em contrário, retire, pois não está fazendo falta. Ou troque por um: [code=fw:xosw6wch]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; SYSREFRESH<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:xosw6wch] [code=fw:xosw6wch]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;HB_GCALL<span style="color: #000000;">&#40;</span> .F. <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Pode ser que não funcione em conjunto com ActiveX.</span><br />&nbsp;</div>[/code:xosw6wch] Regards, saludos.
ACTIVEX ACCESS_VIOLATION
Este problema é antigo. Eu tinha contruido uma rotina para visualizar PDFs com tActivex():Redefine(). Os 2 primeiros documentos abrem corretamente, passado alguns segundos este erro se manifesta. Ja tentei de tudo, e não adianta. Então eu desisti.
ACTIVEX ACCESS_VIOLATION
Se genera un fichero hb_out.log ? Que llamadas muestra Windows en el error ?
ACTIVEX ACCESS_VIOLATION
Antonio, In the begin of this post I have included the content of HB_OUT.log. IF I comment HB_GCALL( ) on method End() of dialog.prg everything works fine.
ACTIVEX ACCESS_VIOLATION
have you considered to create an external EXE using your PRG code and call it for each document ? That way the memory of your app and the memory used by such OCX will not conflict. I see it is a private OCX, have you contacted its developers for help ?
ACTIVEX ACCESS_VIOLATION
Antonio, have you considered to create an external EXE using your PRG code and call it for each document ? That way the memory of your app and the memory used by such OCX will not conflict. [b:1fmdzii8][color=#00BF00:1fmdzii8]No, because I have to interact with the ocx created, add files, doing merge, etc[/color:1fmdzii8][/b:1fmdzii8] I see it is a private OCX, have you contacted its developers for help ? [b:1fmdzii8][color=#00BF00:1fmdzii8]Yes it was the first thing I did, but they told that don't have this kind of problem with any other language ![/color:1fmdzii8][/b:1fmdzii8] [b:1fmdzii8]Important [/b:1fmdzii8]- I use this OCX since when I was working with FW/Clipper(different version of course). WIth Harbour I come using it since 2014 without problems. The problem has start from FWH1707.
ACTIVEX ACCESS_VIOLATION
I'm sorry I know this post is from 2018 but I have a similar problem. I use an OCX from Topaz to gather patient signatures on documents. The line hb_gcAll() inside Tdialog breaks the program after a few times being executed. Has a solution to this been found? Thank you.
ACTIVEX ACCESS_VIOLATION
Dear Reinaldo, do you get a hb_out.log file ? If so, please post it here, thanks
ACTIVEX ACCESS_VIOLATION
Possibly tonight after users are gone, I can access the PCs that have this problem which are the ones using a Topaz signature pad. But I can tell you the top line on the call list looks like this: [quote:2mschr70]Called from HB_GCALL(0) Called from TDIALOG:END(555) in .\source\classes\DIALOG.PRG [/quote:2mschr70] That's how I know the problem is at hb_gcAll(). But this is only happening on the PCs with the Topaz Signature pad. All other PCs running the very same .exe work fine. The only difference is the application on those other PCs never calls any Topaz OCX methods. For now I commented that line and I'm linking dialog.prg to override that line. But I know that others in the fwh community are using Topaz signature pads. Are they also commenting this line?
ACTIVEX ACCESS_VIOLATION
Realmente el problema es muy antiguo. Otras veces ha ocurrido con CodeJock <!-- m --><a class="postlink" href="https://www.forums.fivetechsupport.com/viewtopic.php?f=3&t=26350&start=15#p145103">https://www.forums.fivetechsupport.com/ ... 15#p145103</a><!-- m --> Pareciera que hay un problema con determinado tratamiento de determinados objetos OLE Lo que yo haria seria intentar poner a NIL manualmente y antes de que se cierre el dialogo de la manera concreta posible todos los objetos OLE utilizados
ACTIVEX ACCESS_VIOLATION
[quote:vetgmy8f]Lo que yo haria seria intentar poner a NIL manualmente y antes de que se cierre el dialogo de la manera concreta posible todos los objetos OLE utilizados[/quote:vetgmy8f] Es buena sugerencia. Puedo ver como eso debiera funcionar. Gracias.
ACTIVEX PDF y fusión de datos
Con ACTIVEX PDF logro visualizar por pantalla un formulario PDF con campos editables para rellenar. Sería un gran avance poder rellenar esos campos automáticamente con los datos contenidos en un registro de una BD. ¿Es posible esto? Alguien sabe cómo se hace o existe documentación al respecto? Un saludo, Manuel Aranda ------------------------------------------------- FWH 2.8 Octubre/2006
ACTIVEX PDF y fusión de datos
Hola Manuel No sé exactamente cómo funciona el activeX PDF, pero te puedo dar una pista que espero te funcione. Como sabes al crear el PDF con campos editables se crea un archivo similar de extensión FDF (Forms Data Format) qe es el que guarda los nombres de los campos y su contenido. Entonces el truco está en acceder a este archivo con funciones de bajo nivel y modificar sus datos. Y eso sería todo. A continuación te muestro el código que hace esto pero en PHP (lo encontré en Internet), con el que te puedes guiar, pasarlo a Harbour y probar: <?php // ----------------------------------------------------------------------------------------------- // Class: PHP2PDF // Subject: Incrustar varibles de PHP en formularios PDF // Mail: <!-- e --><a href="mailto:arturo@pinrel.com">arturo@pinrel.com</a><!-- e --> // Version: 1.0 // Update: 2004-01-20 // ----------------------------------------------------------------------------------------------- class PHP2PDF { var $matriz; function Push ($campo, $valor) { $this->matriz[$campo]=$valor; } function Make ($FicheroPDF, $FicheroFDF) { $buscar = array('\\', '(', ')'); $reemplazar = array('\\\\', '\(', '\)'); $fdf = "%FDF-1.2\n%‚„œ”\n1 0 obj \n<< /FDF << /Fields [\n"; foreach ($this->matriz as $campo => $valor) { $campo_bueno = str_replace($buscar, $reemplazar, $campo); $valor_bueno = str_replace($buscar, $reemplazar, $valor); $fdf .= "<< /V ($valor_bueno)/T ($campo_bueno) >> \n"; } $fdf .= "]\n/F ($FicheroPDF) >> >>\nendobj\ntrailer\n<<\n/Root 1 0 R \n\n>>\n%%EOF"; // Genera el Fichero de Intercambio de datos FDF $f_out=fopen($FicheroFDF,"w"); fputs($f_out, $fdf); fclose($f_out); // Salta al fichero PDF header("Location:$FicheroPDF"); } } // Fin de la Clase ?> Espero que te sirva el dato . También me interesa el tema. Suerte y un Saludo Marcelo Jingo
ACTIVEX PDF y fusión de datos
Gracias, sjingo Ya es algo por donde empezar. Me pongo manos a la obra y ya contaré. Un saludo, Manuel
ACTIVEX PDF y fusión de datos
Bueno, por si a alguno de Vds. le interesa: He conseguido, ¡¡¡¡ por fín !!! fusionar un fichero PDF con un registro de la base de datos. Es tan simple como enviar a un fichero XML los datos de que se trate. El fichero XML tiene que tener el mismo nombre que el fichero PDF y contener los mismos nombres de campos que el fichero PDF. Después se ejecuta con WinExec el ejecutable de Acrobat seguido del fichero XML, y se produce la magia. Así que tenemos PRUEBA.PDF PRUEBA.XML [code:207e7qna] Local cFicheroXML&#58;= 'C&#58;\MAR\pdf\Prueba&#46;pdf" Local cLugarAcrobat&#58;="C&#58;\Archivos de programa\Adobe\Acrobat 7&#46;0\Reader\AcroRd32&#46;exe" Winexec&#40;cLugarAcrobat+" "+cFicheroXML&#41; [/code:207e7qna] El fichero XML queda como sigue [code:207e7qna] <?xml version='1&#46;0' encoding='ISO-8859-1' ?> <xfdf xmlns='http&#58;//ns&#46;adobe&#46;com/xfdf/' xml&#58;space='preserve'> <fields> <field name='nif'> <value> 23787664Y</value> </field> <field name='sexo'> <value>H</value> </field> <field name='apellido1'> <value>JIMENEZ </value> </field> <field name='apellido2'> <value>GONZALEZ </value> </field> <field name='nombre'> <value>ANTONIO MANUEL </value> </field> <field name='provincia'> <value>GRANADA </value> </field> <field name='telefono'> <value>958824464</value> </field> </fields> <f href='C&#58;\MAR\pdf\Prueba&#46;pdf'/> </xfdf> [/code:207e7qna] Eso sí, lo que no he conseguido es ejecutarlo desde ACTIVEX y que no reconoce la extensión XML. Si se lanza con el fichero PDF no recoge los datos del XML. Un saludo, Manuel Aranda
ACTIVEX PDF y fusión de datos
Hola Manuel Se ve interesante Podrias colocar un ejemplo pequeño funcional para poder mejor entender Saludos Patricio
ACTIVEX PDF y fusión de datos
Creo que esto esta mal; Local cFicheroXML:= 'C:\MAR\pdf\Prueba.pdf" Deberia ser .XML , no ? Por cierto, me gustaria saber como consigues crear un PDF con campos editables....
ACTIVEX PDF y fusión de datos
[quote="thefull":69g8zlob]Creo que esto esta mal; Local cFicheroXML:= 'C:\MAR\pdf\Prueba.pdf" Deberia ser .XML , no ? Por cierto, me gustaria saber como consigues crear un PDF con campos editables....[/quote:69g8zlob] Efectivamente, está mal, debe ser .XML. Siento no poder ayudarte en cuanto a crear un PDF con campos editables, pues no lo sé. Hasta ahora lo que he hecho ha sido editar ficheros PDF ya creados con el Adobe Acrobat y cambiarles el nombre de los campos para que coincidan con los campos del fichero .XML Un saludo, Manuel
ACTIVEX PDF y fusión de datos
[quote="Manuel Aranda":2pd14k97][quote="thefull":2pd14k97]Creo que esto esta mal; Local cFicheroXML:= 'C:\MAR\pdf\Prueba.pdf" Deberia ser .XML , no ? Por cierto, me gustaria saber como consigues crear un PDF con campos editables....[/quote:2pd14k97] Efectivamente, está mal, debe ser .XML. Siento no poder ayudarte en cuanto a crear un PDF con campos editables, pues no lo sé. Hasta ahora lo que he hecho ha sido editar ficheros PDF ya creados con el Adobe Acrobat y cambiarles el nombre de los campos para que coincidan con los campos del fichero .XML Un saludo, Manuel[/quote:2pd14k97] Ostras Manuel!!! ¿ Entonces que sentido tiene esto si no se puede crear uno un propio PDF <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) --> ? Quizas usar uno ya creado ...? Seria de utilidad poder experimentar más sobre ello. ¿ puedes enviarme por mail para poder experimentar ? Gracias
ACTIVEX PDF y fusión de datos
Por cierto Manuel, ¿ y si en vez de XML la extension le pones .XFDF ? Ahi quizás si que te funcione....
ACTIVEX PDF y fusión de datos
Hola: Para crear PDF con campos editables necesitas la versión más completa del Adobe Acrobat, creo que es la edición profesional. Manuel, estaría bien que publicaras un ejemplo de lo que haces. Saludos,
ACTIVEX PDF y fusión de datos
En primer lugar, Acrobat Reader solo sirve para visualizar ficheros PDF. Si quieres modificarlos y/o editar campos necesitas Adobe Acrobat, con la herramienta Form se crean/modifican los campos. El ejemplo es tan sencillo como esto: [code:3g5rek5x] Local cFicheroXML&#58;= "nomina&#46;xml" Local cLugarAcrobat&#58;="C&#58;\Archivos de programa\Adobe\Acrobat 7&#46;0\Reader\AcroRd32&#46;exe" Winexec&#40;cLugarAcrobat+" "+cFicheroXML&#41; [/code:3g5rek5x] Aquí teneis los ficheros: <!-- m --><a class="postlink" href="http://hyperupload.com/download/029aaf6b33/nomina.pdf.html">http://hyperupload.com/download/029aaf6 ... a.pdf.html</a><!-- m --> <!-- m --><a class="postlink" href="http://hyperupload.com/download/02339bd179/nomina.xml.html">http://hyperupload.com/download/02339bd ... a.xml.html</a><!-- m --> Saludos, Manuel
ACTIVEX PDF y fusión de datos
[quote="thefull":1kb748p9]Por cierto Manuel, ¿ y si en vez de XML la extension le pones .XFDF ? Ahi quizás si que te funcione....[/quote:1kb748p9] Desde ACTIVEX no funciona ni con .XML y con .XFDF., solo con .PDF. Al menos hasta donde mis modestos conocimientos llegan. Aquí adjunto un nuevo ejemplo más completo de un PDF bajado de la web de la DGT. <!-- m --><a class="postlink" href="http://hyperupload.com/download/028d829820/SolicitudBajaVehiculo.pdf.html">http://hyperupload.com/download/028d829 ... o.pdf.html</a><!-- m --> <!-- m --><a class="postlink" href="http://hyperupload.com/download/0245249758/SolicitudBajaVehiculo.xml.html">http://hyperupload.com/download/0245249 ... o.xml.html</a><!-- m --> Un saludo, Manuel
ACTIVEX PDF y fusión de datos
Manuel, Pudiste resolver como llenar los campos de una forma PDF con datos almacenados en un fichero DBF? IF Yes msginfo ("Podrias postear un ejemplo?") ELSE msginfo("Cual fue tu experiencia en este proyecto?" ENDIF Saludos George
ACTIVEX PDF y fusión de datos
Claro que lo resolví y en los dos mensajes anteriores tienes los ejemplos. Saludos, Manuel [quote="George":2jed1hjf]Manuel, Pudiste resolver como llenar los campos de una forma PDF con datos almacenados en un fichero DBF? IF Yes msginfo ("Podrias postear un ejemplo?") ELSE msginfo("Cual fue tu experiencia en este proyecto?" ENDIF Saludos George[/quote:2jed1hjf]
ACTIVEX PDF y fusión de datos
Manuel, La razon por la que te pregunte es porque al tratar de bajar los ejemplos dice "file not available". Si fueras tan amable de subirlo de nuevo Saludos George
ACTIVEX PDF y fusión de datos
[quote="Manuel Aranda":mh69d2ri]Claro que lo resolví y en los dos mensajes anteriores tienes los ejemplos.[/quote:mh69d2ri] Manuel, en primer lugar felicidades por el logro. Desde hace tiempo vengo rellenando los impresos oficiales 300 y 110 de Hacienda, pero el 390 se me resiste. En los mod. 300 y 110 para tomar los datos, usa un fichero ASCII plano y es fácil. Pero para el modelo 390 usa un fichero.XML, como el que tu comentas. Desgraciadamente, el fichero tiene muchísimas variables y queria pedir, a los amigos del foro, (para ahorrarme algunas horas de trabajo) si alguno viene usando este modelo 390.
ACTIVEX PDF y fusión de datos
Me adhiero a tu petición, me ocurre xastamente igual que a tí. Un saludo, Manuel [quote="Manuel Valdenebro":r5wyj0xx][quote="Manuel Aranda":r5wyj0xx]Claro que lo resolví y en los dos mensajes anteriores tienes los ejemplos.[/quote:r5wyj0xx] Manuel, en primer lugar felicidades por el logro. Desde hace tiempo vengo rellenando los impresos oficiales 300 y 110 de Hacienda, pero el 390 se me resiste. En los mod. 300 y 110 para tomar los datos, usa un fichero ASCII plano y es fácil. Pero para el modelo 390 usa un fichero.XML, como el que tu comentas. Desgraciadamente, el fichero tiene muchísimas variables y queria pedir, a los amigos del foro, (para ahorrarme algunas horas de trabajo) si alguno viene usando este modelo 390.[/quote:r5wyj0xx]
ACTIVEX PDF y fusión de datos
Hace algun tiempo descubrí el pdftk. Si bien lo usaba para otra cosa, sé que tambien se puede usar para hacer el merge del xml con los campos del pdf. Es de uso bastante sencillo <!-- m --><a class="postlink" href="http://www.accesspdf.com/pdftk">http://www.accesspdf.com/pdftk</a><!-- m --> Saludos, Carlos.
ACTIVEX PDF y fusión de datos
Disculpa George, no había visto tu post. Este es el código: Local cFicheroXML:= "bajavehiculo.pdf.xml" Local cLugarAcrobat:="C:\Archivos de programa\Adobe\Acrobat 7.0\Reader\AcroRd32.exe" Winexec(cLugarAcrobat+" "+cFicheroXML) Aquí están los ficheros: <!-- m --><a class="postlink" href="http://hyperupload.com/download/021c956612/bajavehiculo.pdf.html">http://hyperupload.com/download/021c956 ... o.pdf.html</a><!-- m --> <!-- m --><a class="postlink" href="http://hyperupload.com/download/0295236a35/bajavehiculo.pdf.XML.html">http://hyperupload.com/download/0295236 ... f.XML.html</a><!-- m --> Un saludo, Manuel [quote="George":3cgtnsdv]Manuel, La razon por la que te pregunte es porque al tratar de bajar los ejemplos dice "file not available". Si fueras tan amable de subirlo de nuevo Saludos George[/quote:3cgtnsdv]
ACTIVEX PDF y fusión de datos
[quote="Manuel Aranda":27ipwc2f]En primer lugar, Acrobat Reader solo sirve para visualizar ficheros PDF. Si quieres modificarlos y/o editar campos necesitas Adobe Acrobat, con la herramienta Form se crean/modifican los campos. El ejemplo es tan sencillo como esto: [code:27ipwc2f] Local cFicheroXML&#58;= "nomina&#46;xml" Local cLugarAcrobat&#58;="C&#58;\Archivos de programa\Adobe\Acrobat 7&#46;0\Reader\AcroRd32&#46;exe" Winexec(cLugarAcrobat+" "+cFicheroXML) [/code:27ipwc2f] Aquí teneis los ficheros: <!-- m --><a class="postlink" href="http://hyperupload.com/download/029aaf6b33/nomina.pdf.html">http://hyperupload.com/download/029aaf6 ... a.pdf.html</a><!-- m --> <!-- m --><a class="postlink" href="http://hyperupload.com/download/02339bd179/nomina.xml.html">http://hyperupload.com/download/02339bd ... a.xml.html</a><!-- m --> Saludos, Manuel[/quote:27ipwc2f] Hola Manuel He conseguido importar los datos de un xml a un pdf pero mi problema es que necesito importar los datos del 10-T de varios trabajadores a un pdf y solo me sale un registro.como debo crear el xml?? Por cierto puedes adjuntar de nuevo los ejemplos.Gracias Un Saludo Sergio Martín
ACTIVEX PDF y fusión de datos
Estimado Mr.Manuel, También estoy interesado en este tema. Parece que la descarga los enlaces que contiene la muestra ha caducado. A la espera de más información acerca de su experiencia en este sentido. Saludos Anser -------------------- Dear Manuel, I am also interested in this subject. It seems that the download links containing the sample has expired. Waiting to hear more about your experience on this. Regards Anser
ACTIVEX PDF y fusión de datos
Aquí teneis el enlace solicitado: <!-- m --><a class="postlink" href="http://rapidshare.com/files/197650527/ejemplo2.rar.html">http://rapidshare.com/files/197650527/ejemplo2.rar.html</a><!-- m -->
ACTIVEX PDF y fusión de datos
Dear Mr.Manuel, Thankyou very much. Regards Anser
ACTIVEX PDF y fusión de datos
Parece que perduran poco los archivos en este sitio. Aquí lo teneis de nuevo: <!-- m --><a class="postlink" href="http://rapidshare.de/files/45317496/ejemplo2.rar.html">http://rapidshare.de/files/45317496/ejemplo2.rar.html</a><!-- m -->
ACTIVEX PDF y fusión de datos
Descargado... Gracias Manuel. Saludos.
ACTIVEX PDF y fusión de datos
Saludos, Manuel. Me uno al grupo de interesados en el tema. ¿Serías tan amable de subir nuevamente el ejemplo, o enviármelo a mi correo? <!-- e --><a href="mailto:f.alegria.p@gmail.com">f.alegria.p@gmail.com</a><!-- e --> Gracias de antemano.
ACTIVEX PDF y fusión de datos
Hola Manuel, [quote="Manuel Aranda":du2elsdh]Parece que perduran poco los archivos en este sitio. Aquí lo teneis de nuevo: [/quote:du2elsdh] Una sugerencia para probar: para subir archivos usa <!-- m --><a class="postlink" href="http://www.box.net">http://www.box.net</a><!-- m --> . No te hace esperar como rapidshare y demás, y no caducan las subidas. Un saludo
ACTIVEX PDF y fusión de datos
[quote="Manuel Aranda":2uz2p1ii]Parece que perduran poco los archivos en este sitio. Aquí lo teneis de nuevo: <!-- m --><a class="postlink" href="http://rapidshare.de/files/45317496/ejemplo2.rar.html">http://rapidshare.de/files/45317496/ejemplo2.rar.html</a><!-- m -->[/quote:2uz2p1ii] Hola Manuel, disculpa tanta lata, pero podrias postear el ejemplo nuevamente, me interesa ver como funciona para referencia mia, tambien lo subire a mi sitio web para que no se pierda el link....
ACTIVEX PDF y fusión de datos
Bayron, lo siento, pero ya no dispongo de ese archivo. A ver si Anserkk o Francisco J. lo conservan y pueden subirlo ellos. Si no es así trataré de construir uno nuevo.
ACTIVEX PDF y fusión de datos
Dear Mr.Bayron, Please try the below given link [url:121fhe0h]http&#58;//rapidshare&#46;com/files/450193864/ejemplo2&#46;rar[/url:121fhe0h] Regards [b:121fhe0h]Anser[/b:121fhe0h]
ACTIVEX PDF y fusión de datos
Thanks Anser, I uploaded to my WebSite so we do not loose it again...... [url:1razygrz]http&#58;//www&#46;mayapos&#46;com/FiveWin/ejemplo2&#46;rar[/url:1razygrz]
ACTIVEX PDF y fusión de datos
Buenos días, ¿Cómo puedo transformar mis archivos XML a PDF utilizando PDFTK.exe? Yo tengo varios archivos XML y no se puede convertir a PDF. gracias
ACTIVEX PDF y fusión de datos
Gracias a Manuel Aranda y a todos los que me ayudaron con este asunto. [color=#0000FF:m6dbv7bc]Ahora lo que trato de encontrar es como imprimir el archivo y regresar al programa automaticamente... De ser posible sin usar Activex....[/color:m6dbv7bc] Intentando con: [code=fw:m6dbv7bc]<div class="fw" id="{CB}" style="font-family: monospace;">ShellExecute<span style="color: #000000;">&#40;</span> ,<span style="color: #ff0000;">"print"</span>, <span style="color: #ff0000;">"salida.pdf"</span>,,,<span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span></div>[/code:m6dbv7bc] Pero de esta forma abre la ventana de Adobe Acrobat, lo cual yo no quiero... Alguna sugerencia???
ACTIVEX PDF y fusión de datos usando PDFTK.EXE
ACTIVEX PDF y fusión de datos usando PDFTK.EXE Buenos días, ¿Cómo puedo transformar mis archivos XML a PDF utilizando PDFTK.exe? Yo tengo varios archivos XML y no se puede convertir a PDF. gracias Link del assunto: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=4897&start=30#p111614">viewtopic.php?f=6&t=4897&start=30#p111614</a><!-- l --> Saludos
ACTIVEX PDF y fusión de datos usando PDFTK.EXE
Karinha, From [url:3vnlwdus]http&#58;//www&#46;pdf995&#46;com/faq_dev&#46;html[/url:3vnlwdus] read the following: [quote:3vnlwdus]What is the easiest way to convert XML to formatted PDF? OmniFormat will convert XML to PDF using a DOC file as a layout template. It may be run from the command line. It is free and may be downloaded from <!-- m --><a class="postlink" href="http://www.omniformat.com">http://www.omniformat.com</a><!-- m --> . [/quote:3vnlwdus] I have not tested it but it may be what you need.... [quote:3vnlwdus]XML Conversion OmniFormat may be used to dynamically convert XML data to any output format supported by OmniFormat including PDF. A Microsoft Word file is used as a template to supply layout information. OmniFormat replaces fields in the Word template with values specified in the XML file. Next it converts the document to the final format. Sample (acme.xml): <ORDER OutputFile="c:\invoices\acme corporation.pdf" WordTemplate="c:\templates\invoice template.doc" CompanyName="Acme Corporation Inc." Address1="345 Garden Avenue" Address2="San Gorge, CA 94301" Item1="Widgets" Quantity1="2" Price1="500" Item2="" Quantity2="" Price2="" Total="500" /> OmniFormat will process acme.xml by 1. Substitution of the name-value pairs into "c:\templates\invoice template.doc" followed by 2. Conversion to c:\invoices\acme corporation.pdf. The template file is not modified by the process. "OutputFile" and "WordTemplate" are reserved names. Note: PdfEdit995 may be used to batch convert Microsoft Office documents to PDF. [/quote:3vnlwdus]
ACTIVEX PDF y fusión de datos usando PDFTK.EXE
Thanks Bayron, I'll try. hugs
ACTUALIZACION DE TWBROWSE DE HC
Estimados amigos del foro, me preguntaba si alguno de ustedes posee alguna actualización de la clase Twbrowse de HC, ya que la que usamos es la 1.7 y con la nueva versión de FWH 8.12 y Xharbour esta inestable,,agradecería si alguien la esta usando y podría compartir el codigo desde ya muchas gracias a todos, Saludos,
ACTUALIZACION DE TWBROWSE DE HC
Gustavo, Ese es el ultimo release, no hay uno nuevo. Salu2, Ariel.
ACTUALIZACION DE TWBROWSE DE HC
Gracias, Ariel, de todas formas me gustaría si alguien la tiene funcionando con las ultimas versiones de FWH, si es posible me envíe los archivos WBROWSE.PRG y la TWBRW32.lib, porque la que tengo realmente no me funciona bien, Desde ya muchas garcias saludos,
ACTUALIZACION DE TWBROWSE DE HC
Yo la tengo funcionando con FH 0810, si quieres te la mando...(y para adonde)
ACTUALIZACION DE TWBROWSE DE HC
Si Angel por favor MUCHAS GRACIAS, a: <!-- e --><a href="mailto:gustavo@prediger.com.ar">gustavo@prediger.com.ar</a><!-- e --> <!-- e --><a href="mailto:grprediger@gmail.com">grprediger@gmail.com</a><!-- e --> Saludos,
ACTUALIZACION DE TWBROWSE DE HC
Listo, espero te ayude
ACTUALIZACION DE TWBROWSE DE HC
Angel, Podrias subirla a mediafire, o similar, para que la descarguemos ? gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
ACTUALIZACION DE TWBROWSE DE HC
Estimado Antonio, en el link a continuación podrán bajar la versión WBROWSE de HC, funcionando a fondo como siempre con las versiones FWH 8.12 y XH 1,1, en el ZIP encontraras WBROWSE.PRG TMULTISE.PRG *--------------------> estas dos agregarlas al fuente de la aplicación para que las compile junto a nuestra aplicación WBRWLINE.OBJ --> Agregarla en el sector de los OBJ de la Aplicación con esto es suficiente y funciona realmente muy bien como siempre, se debe descartar del compilador las viejas TWBROWSE.LIB o cualquier .LIB del Twbrowse ya que la misma esta en la OBJ, Así lo usamos nosotros y realmente funciona muy bien con todo, CDX, ADS, ADO, ya esta probado.... espero les sirva saludos, [url:2l7faioq]http&#58;//www&#46;prediger&#46;com&#46;ar/twbrowse_hc&#46;zip[/url:2l7faioq] Gustavo Prediger
ACTUALIZACION DE TWBROWSE DE HC
Guspre, tienes un ejemplo con ADO ? SALUDOS.
ACTUALIZACION DE TWBROWSE DE HC
Estimado Gustavo muchas gracias, por tu Auda y compartir dicha actualizacion Realmente da placer pertenecer a este grupo. salu2 david argentina
ACTUALIZAR A FWH28
Hola Compañeros, despues de un laaarrgo rato de ausencia por aqui, volvemos a las andadas y lo primero que estoy tratando de hacer es actualizar mi fwh y mi xharbour pero me encuentro con los siguientes problemas: 1) No se encuentra la lib dbfdbt.lib, ya revise en xharbour\lib y efectivamente no esta, si la copio de mi version de xharbour 99.5 funcionara sin problemas o de donde la obtengo??? 2) Alguien tendra por ahi la twbrowse de Hernan para FWH28?? ya que me da un error de _hb_socket en wbrwline.c Saludos y gracias LCP Eduardo Borondón Muñiz
ACTUALIZAR A FWH28
[quote="EBM":25cnyef3]Hola Compañeros, despues de un laaarrgo rato de ausencia por aqui, volvemos a las andadas y lo primero que estoy tratando de hacer es actualizar mi fwh y mi xharbour pero me encuentro con los siguientes problemas: 1) No se encuentra la lib dbfdbt.lib, ya revise en xharbour\lib y efectivamente no esta, si la copio de mi version de xharbour 99.5 funcionara sin problemas o de donde la obtengo??? 2) Alguien tendra por ahi la twbrowse de Hernan para FWH28?? ya que me da un error de _hb_socket en wbrwline.c Saludos y gracias LCP Eduardo Borondón Muñiz[/quote:25cnyef3] Eduardo, en lugar de dbfdbt, hay que incluir hbsix.lib, con eso podrias compilar sin problemas. Por lo de WBrowse, no la uso. Espero te ayude
ACTUALIZAR A FWH28
Gracias William, un problema resuelto Saludos !!!
ACTUALIZAR A FWH28 CON EAGLE
Tengo una aplicacion con xHarbour 0.99.5 + FWH2.6 + EAGLE 2.5 donde solamente utilizo las funciones en C. Estoy haciendo la migración a FWH28 y xHarbour 0.99.61 pero al recompilar todos los modulos se me genera el siguiente error: Error: Unresolved external '_hb_stack' referenced from C:\EAGLE\EAGLE1C.LIB|MSAPI El mismo error se me producia con la WBrowse de Hernan y Antonio Linares en un post anterior me dijo que incluyera este codigo en mi aplicacion: #pragma BEGINDUMP #include "hbstack.h" #include "hbapiitm.h" void * hb_stack = &HB_VM_STACK; #pragma ENDDUMP y el problema se corrigio, pero en éste caso, se genera la aplicación correctamente pero me empieza a dar errores al hacer las llamadas a las funciones para conectarme a MySql. Yo solamente uso la eagle1C.Lib donde se supone que solamente vienen funciones escritas en C y no se deberia requerir volver a crear la lib y no puedo crearla por que no tengo los fuentes de eagle 2.5 de las funciones en C. Alguien me pudiera orientar sobre que puedo hacer??? Con FWH 2.6 + xHarbour 0.99.5 funciona perfectamente, asi que es algo con las nuevas versiones pero no se que pueda ser, si alguien me pudiera dar una mano, se lo agradeceria. Saludos !!! LCP Eduardo Borondón Muñiz
ACTUALIZAR A FWH28 CON EAGLE
Solucionado!!! Ya localice en mis respaldos los fuentes en c de eagle 2.5, volvi a crear la lib y problema resuelto. Gracias LCP Eduardo Borondón Muñiz
ACTUALIZAR DATA DE DBCOMBO QUE USA MYSQL
Saludos, estaba usando DBCOMBO con Array y cuando queria actualizar el contenido usaba CLONE de otro array y listo, todo fino, ahora cambie a usar directamante un Query de Mysql, filtro el Query con un WHERE, pero no hayo como actualizar ahora la data del DbCombo con los nuevos registros del Query, aca dejo algo de cosigo, saludos...gracias... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> DbCombo con Query-Mysql [code=fw:35kvgvj3]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> DBCOMBO oCbx <span style="color: #0000ff;">VAR</span> aVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">44</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">4039</span> <span style="color: #0000ff;">OF</span> oFldX:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">UPDATE</span> ;<br />&nbsp; &nbsp; &nbsp; ITEMFIELD <span style="color: #ff0000;">"estado_id"</span> ;<br />&nbsp; &nbsp; &nbsp; LISTFIELD <span style="color: #ff0000;">"estado_nombre"</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ALIAS</span> oQry ;<br />&nbsp;</div>[/code:35kvgvj3] ACTUALIZO DATA DEL DBCOMBO CON array [code=fw:35kvgvj3]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oCbx:<span style="color: #000000;">aItems</span> := AClone<span style="color: #000000;">&#40;</span> aDire<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />oCbx:<span style="color: #000000;">aList</span> := AClone<span style="color: #000000;">&#40;</span> aDire<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br /><br />oCbx:<span style="color: #000000;">SetItems</span><span style="color: #000000;">&#40;</span> oCbx:<span style="color: #000000;">aItems</span>, oCbx:<span style="color: #000000;">aList</span>, .t. <span style="color: #000000;">&#41;</span> ,;<br />oCbx:<span style="color: #0000ff;">REFRESH</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:35kvgvj3] COMO LO HAGO CON UN QUERY.? INTENTE ESTO PERO SOLO DA ERROR [code=fw:35kvgvj3]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oCbx:<span style="color: #000000;">aItems</span> := AClone<span style="color: #000000;">&#40;</span> oQry:<span style="color: #000000;">aRow</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />oCbx:<span style="color: #000000;">aList</span> := AClone<span style="color: #000000;">&#40;</span> oQry:<span style="color: #000000;">aRow</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />.<br />.<br />.<br />.<br />&nbsp;</div>[/code:35kvgvj3]
ACTUALIZAR DATA DE DBCOMBO QUE USA MYSQL
holaaaa...alguna idea..? saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
ACTUALIZAR DATA DE DBCOMBO QUE USA MYSQL
Resuelto gracias al colega Cruz Alfredo-Compubrion, gracias, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> Solucion [code=fw:1clwqab7]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oCbx :<span style="color: #000000;">Refill</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />oCbx :<span style="color: #0000ff;">REFRESH</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:1clwqab7]
ACTUALIZAR DATOS DE DOCUMENTO DE WORD DINAMICAMENTE
Saludos, necesito tener un documento de WORD, llamemosle una plantilla con un escrito predeterminado, tipo contrato, pero que debo usar desde mi aplicacion y al imprimirla ciertos datos seran diferentes dependiendo de los datos del cliente que se le imprima el contrato o documento de word. Alguna idea, sugerencia, recomendacion y ejemplo de como usar word con plantilla y macros desde FW.? gracias, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
ACTUALIZAR DATOS DE DOCUMENTO DE WORD DINAMICAMENTE
José Luis Guarda tu plantilla en .rtf (Formato texto) si usas MySql guardarlo en texto en un campo TEXT o MEDIUMTEXT Los lugares que queres cambiar coloca entre corchetes así: Trabaja en [TRABAJO] El programa para el llenado: [code=fw:1uhae6gc]<div class="fw" id="{CB}" style="font-family: monospace;"><br />cTrab:=<span style="color: #ff0000;">"INFORMATICA"</span><br /><br /><span style="color: #B900B9;">//Luego abrir la plantilla</span><br /><br />cTxtFile:=STRTRAN<span style="color: #000000;">&#40;</span>cTxtFile, <span style="color: #ff0000;">"[TRABAJO]"</span>,cTrab<span style="color: #000000;">&#41;</span><br /><br />&nbsp;</div>[/code:1uhae6gc] Saludos, Adhemar
ACTUALIZAR DATOS DE DOCUMENTO DE WORD DINAMICAMENTE
[quote="acuellar":b7tjyskp]José Luis Guarda tu plantilla en .rtf (Formato texto) si usas MySql guardarlo en texto en un campo TEXT o MEDIUMTEXT Los lugares que queres cambiar coloca entre corchetes así: Trabaja en [TRABAJO] El programa para el llenado: [code=fw:b7tjyskp]<div class="fw" id="{CB}" style="font-family: monospace;"><br />cTrab:=<span style="color: #ff0000;">"INFORMATICA"</span><br /><br /><span style="color: #B900B9;">//Luego abrir la plantilla</span><br /><br />cTxtFile:=STRTRAN<span style="color: #000000;">&#40;</span>cTxtFile, <span style="color: #ff0000;">"[TRABAJO]"</span>,cTrab<span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:b7tjyskp] Saludos, Adhemar[/quote:b7tjyskp] Adhemar gracias por responder, mi duda es la siguiente, el documento debe estar accesible al cliente ya que cuando el quiera puede cambiar partes, agregar, modificar o quitar, como por ejemplo una Clausula, en este caso es un contrato, tendras un ejemplo mas completo.? gracias, saludos...
ACTUALIZAR DATOS DE DOCUMENTO DE WORD DINAMICAMENTE
Entonces sólo tiene que guardarlo en .rtf y lo pueden modificar con WORD cuando sea necesario. Saludos, Adhemar
ACTUALIZAR DATOS DE DOCUMENTO DE WORD DINAMICAMENTE
[quote="acuellar":yqjdmwfg]Entonces sólo tiene que guardarlo en .rtf y lo pueden modificar con WORD cuando sea necesario. Saludos, Adhemar[/quote:yqjdmwfg] Ok, y en mi documento RTF coloco entre corchetes los "campos" que van hacer dinamicos.?, buscare temas de como abrir, usar word y pasarle los valores a la plantilla RTF, gracias, saludos...
ACTUALIZAR DATOS DE DOCUMENTO DE WORD DINAMICAMENTE
Joseluissystruiz, buenos días: Si utilizas DBF-CDX como yo, puedes hacer uso de la clase TWord. Yo hago así: El usuario crea sus propios diseño de WORD y los campos a reemplazar tiene que escribirlos mediante "Corchetes". Así de esa manera, la case TWord los identifica y los sustituye por los campos DBF. Así, de un Word de 1 página te imprime un Word de tantas páginas como registros en la DBF tengas. Un ejemplo [code=fw:2u8r39nh]<div class="fw" id="{CB}" style="font-family: monospace;">    <span style="color: #00C800;">TRY</span><br />    oWord:= TWord<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;">&#41;</span><br />    oWord:<span style="color: #000000;">openDoc</span><span style="color: #000000;">&#40;</span>camino+<span style="color: #ff0000;">'<span style="color: #000000;">\m</span>odelos<span style="color: #000000;">\t</span>emporal.doc'</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> .not. eof<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />     <span style="color: #00C800;">if</span> clie->seleccion=.t.<br />      oWord:<span style="color: #000000;">Replace</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'<NOMBRE>'</span> , alltrim<span style="color: #000000;">&#40;</span>clie->NOMBREc<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>    ;    oWord:<span style="color: #000000;">Replace</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'< NOMBRE >'</span> , alltrim<span style="color: #000000;">&#40;</span>clie->NOMBREc<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      oWord:<span style="color: #000000;">Replace</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'<DIRECCION>'</span>, alltrim<span style="color: #000000;">&#40;</span>clie->DIRECCc<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>     ;    oWord:<span style="color: #000000;">Replace</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'< DIRECCION >'</span>, alltrim<span style="color: #000000;">&#40;</span>clie->DIRECCc<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      oWord:<span style="color: #000000;">Replace</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'<POBLACION>'</span>, alltrim<span style="color: #000000;">&#40;</span>clie->POBLAC<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>     ;    oWord:<span style="color: #000000;">Replace</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'< POBLACION >'</span>, alltrim<span style="color: #000000;">&#40;</span>clie->POBLAC<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      oWord:<span style="color: #000000;">printDoc</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      oWord:<span style="color: #000000;">Replace</span><span style="color: #000000;">&#40;</span> alltrim<span style="color: #000000;">&#40;</span>clie->NOMBREc<span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">'<NOMBRE>'</span> <span style="color: #000000;">&#41;</span><br />      oWord:<span style="color: #000000;">Replace</span><span style="color: #000000;">&#40;</span> alltrim<span style="color: #000000;">&#40;</span>clie->DIRECCc<span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">'<DIRECCION>'</span> <span style="color: #000000;">&#41;</span><br />      oWord:<span style="color: #000000;">Replace</span><span style="color: #000000;">&#40;</span> alltrim<span style="color: #000000;">&#40;</span>clie->POBLAC<span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">'<POBLACION>'</span> <span style="color: #000000;">&#41;</span><br />     <span style="color: #00C800;">endif</span><br />     skip<br />    <span style="color: #00C800;">enddo</span><br />    oWord:<span style="color: #0000ff;">endpage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    oWord:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span>.f.<span style="color: #000000;">&#41;</span><br /> </div>[/code:2u8r39nh] Un saludo. LORENZO.
ACTUALIZAR DATOS DE DOCUMENTO DE WORD DINAMICAMENTE
Lorenzo, muchas gracias por tu ejemplo, es lo que necesitaba, uso MySql pero imagino no deberia ser problema, ya que le mando los nombres de los campos igual como lo haces con DBF, hago las pruebas y te comento, es lo que queria ver, como reemplazar los valores entre los corchetes [], saludos...gracias... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
ACTUALIZAR DATOS EN COLUMNA ADICIONAL DE XBROWSE CON QUERY
ACTUALIZAR DATOS DINAMICAMENTE EN COLUMNA ADICIONAL DE XBROWSE CON QUERY Saludos, tengo creado un xbrowse con data de una consulta Mysql con TDolphin, las primeras 4 columnas, 1 es numero de filas del xbrw y las 3 siguiente son campos de la consulta(tabla), luego adiciono una 5ta. columna que inicializo sus valores con ceros, pero que debo reemplazarlos basado en operaciones posteriores, en otra funcion trato de actualizar esta 5ta. columna con oBrw:aArrayData[oBrw:nArrayAt, 5] := xValor, pero me da error, tambien intente con oBrw:aCols[5]:Value := xValor, tambien error. La pregunta de las mil lochas es: puedo o no modificar el valor de la 5ta.columna que no es de un campo de la consulta o estoy inventando loquera.? por los momentos lo resolvi cambiando el xBrw a un array en vez de un Qry, pero es mas trabajo y lo necesito con el Qry. Espero sus comentarios y sugerencias, dejo el codigo del xBrw, gracias, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> [code=fw:1nkbn025]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;aCampos := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"productos_id"</span>, <span style="color: #ff0000;">"productos_nombre"</span>, <span style="color: #ff0000;">"productos_pvp"</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oBrwMenu := TXBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;WITH OBJECT oBrwMenu<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetDolphin</span><span style="color: #000000;">&#40;</span> oQryPro, .t., .t., aCampos <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nMarqueeStyle</span> &nbsp; &nbsp;:= MARQSTYLE_HIGHLROW<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nColDividerStyle</span> := LINESTYLE_BLACK<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lAllowColSwapping</span> := .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lAllowColHiding</span> := .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lColDividerComplete</span> := .t.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nHeaderHeight</span> := <span style="color: #000000;">30</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">l2007</span> := .t.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lFooter</span> := .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lRecordSelector</span> := .t.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> oQryPro:<span style="color: #000000;">RecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> % <span style="color: #000000;">2</span> == <span style="color: #000000;">0</span>, <span style="color: #000000;">&#123;</span><span style="color: #000000;">0</span>, RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #000000;">0</span>, RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">203</span>,<span style="color: #000000;">226</span>,<span style="color: #000000;">254</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bLDblClick</span> := <span style="color: #000000;">&#123;</span>|| add_producto_pedido<span style="color: #000000;">&#40;</span> oQryPro, oBrwPed, aVarPed, aGetPed, aVar, oBrwMenu <span style="color: #000000;">&#41;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">1</span>, aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">REFRESH</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oBrwPed:<span style="color: #000000;">SETFOCUS</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">&#123;</span>|nKey| <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> nKey == VK_RETURN ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span> add_producto_pedido<span style="color: #000000;">&#40;</span> oQryPro, oBrwPed, aVarPed, aGetPed, aVar, oBrwMenu <span style="color: #000000;">&#41;</span>, aVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">1</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">REFRESH</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oBrwPed:<span style="color: #000000;">SETFOCUS</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;END WITH<br /><br />&nbsp; &nbsp;ADD <span style="color: #0000ff;">TO</span> oBrwMenu <span style="color: #00C800;">AT</span> <span style="color: #000000;">1</span> <span style="color: #00C800;">DATA</span> StrZero<span style="color: #000000;">&#40;</span> oBrwMenu:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBrwMenu:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeader</span> &nbsp; &nbsp; &nbsp; := <span style="color: #ff0000;">"Reg."</span><br />&nbsp; &nbsp;oBrwMenu:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br />&nbsp; &nbsp;oBrwMenu:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nDataStrAlign</span> := AL_CENTER<br />&nbsp; &nbsp;oBrwMenu:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span> &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">30</span><br /><br />&nbsp; &nbsp;oBrwMenu:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeader</span> &nbsp; &nbsp; &nbsp; := <span style="color: #ff0000;">"Código"</span><br />&nbsp; &nbsp;oBrwMenu:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bStrData</span> &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span>|| IIF<span style="color: #000000;">&#40;</span> oQryPro:<span style="color: #000000;">LastRec</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> = <span style="color: #000000;">0</span>, SPACE<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</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; &nbsp; &nbsp; &nbsp; &nbsp;STRZERO<span style="color: #000000;">&#40;</span> oQryPro:<span style="color: #000000;">productos_id</span>, <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oBrwMenu:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br />&nbsp; &nbsp;oBrwMenu:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nDataStrAlign</span> := AL_CENTER<br />&nbsp; &nbsp;oBrwMenu:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span> &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">60</span><br /><br />&nbsp; &nbsp;oBrwMenu:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeader</span> &nbsp; &nbsp; &nbsp; := <span style="color: #ff0000;">"Nombres del Producto"</span><br />&nbsp; &nbsp;oBrwMenu:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bStrData</span> &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span>|| IIF<span style="color: #000000;">&#40;</span> oQryPro:<span style="color: #000000;">LastRec</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> = <span style="color: #000000;">0</span>, SPACE<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</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; &nbsp; &nbsp; &nbsp; &nbsp;oQryPro:<span style="color: #000000;">productos_nombre</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oBrwMenu:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br />&nbsp; &nbsp;oBrwMenu:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nDataStrAlign</span> := AL_LEFT<br />&nbsp; &nbsp;oBrwMenu:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span> &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">255</span><br /><br />&nbsp; &nbsp;oBrwMenu:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeader</span> &nbsp; &nbsp; &nbsp; := <span style="color: #ff0000;">"PVP"</span><br />&nbsp; &nbsp;oBrwMenu:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bStrData</span> &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span>|| IIF<span style="color: #000000;">&#40;</span> oQryPro:<span style="color: #000000;">LastRec</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> = <span style="color: #000000;">0</span>, SPACE<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</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; &nbsp; &nbsp; &nbsp; &nbsp;TRANS<span style="color: #000000;">&#40;</span> oQryPro:<span style="color: #000000;">productos_pvp</span>, <span style="color: #ff0000;">"@E 99,999.99"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oBrwMenu:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br />&nbsp; &nbsp;oBrwMenu:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nDataStrAlign</span> := AL_RIGHT<br />&nbsp; &nbsp;oBrwMenu:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span> &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">70</span><br /><br /><span style="color: #000000;">&#91;</span>b<span style="color: #000000;">&#93;</span><span style="color: #B900B9;">// COLUMNAS ADICIONALES, 5TA.COLUMNAS QUE QUIERO CAMBIAR SU VALOR DINAMICAMENTE...[/b]</span><br />&nbsp; &nbsp;oCol := oBrwMenu:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">cHeader</span> &nbsp; &nbsp; &nbsp; := <span style="color: #ff0000;">"Tot.PVP"</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">bStrData</span> &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span>|| IIF<span style="color: #000000;">&#40;</span> oQryPro:<span style="color: #000000;">LastRec</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> = <span style="color: #000000;">0</span>, SPACE<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TRANS<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"@E 99,999.99"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br />&nbsp; &nbsp;oCol:<span style="color: #000000;">nDataStrAlign</span> := AL_RIGHT<br />&nbsp; &nbsp;oCol:<span style="color: #000000;">nWidth</span> &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">70</span><br /><span style="color: #B900B9;">//</span><br />&nbsp; &nbsp;oCol := oBrwMenu:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">cHeader</span> &nbsp; &nbsp; &nbsp; := <span style="color: #ff0000;">"Ing"</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br />&nbsp; &nbsp;oCol:<span style="color: #000000;">AddResource</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"PRODUC16"</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// MUESTRA BMP CON DATA</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">nBtnBmp</span> := <span style="color: #000000;">1</span> <span style="color: #B900B9;">// COLOCA IMAGEN AL BOTON</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">nEditType</span> &nbsp; &nbsp; := EDIT_BUTTON <span style="color: #B900B9;">// BOTON EN LA MISMA DATA</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">bEditBlock</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> | oCol | select_ingre_menu<span style="color: #000000;">&#40;</span> aVar, aGet, oQryPro, oBrwIP <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">// ACCION A REALIZAR PULSAR BOTON</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">nWidth</span> &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">25</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">cToolTip</span> &nbsp; &nbsp; &nbsp;:= <span style="color: #ff0000;">"Pulse Boton para Ingredientes"</span><br /><span style="color: #B900B9;">//</span><br />&nbsp; &nbsp;oCol := oBrwMenu:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">cHeader</span> &nbsp; &nbsp; &nbsp; := <span style="color: #ff0000;">"Add"</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br />&nbsp; &nbsp;oCol:<span style="color: #000000;">AddResource</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SUMAR16"</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// MUESTRA BMP CON DATA</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">nBtnBmp</span> := <span style="color: #000000;">1</span> <span style="color: #B900B9;">// COLOCA IMAGEN AL BOTON</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">nEditType</span> &nbsp; &nbsp; := EDIT_BUTTON <span style="color: #B900B9;">// BOTON EN LA MISMA DATA</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">bEditBlock</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> | oCol | add_producto_pedido<span style="color: #000000;">&#40;</span> oQryPro, oBrwPed, aVarPed, aGetPed, aVar, oBrwMenu <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">// ACCION A REALIZAR PULSAR BOTON</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">nWidth</span> &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">25</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">cToolTip</span> &nbsp; &nbsp; &nbsp;:= <span style="color: #ff0000;">"Pulse Boton para Agregar este Producto"</span><br /><br />&nbsp; &nbsp;oBrwMenu:<span style="color: #000000;">CreateFromResource</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:1nkbn025]
ACTUALIZAR DATOS EN COLUMNA ADICIONAL DE XBROWSE CON QUERY
José Luis. Utilizo TMySql. He intentado lo que describes, pero no lo he conseguido. Aunque no me da ningún error, no hace nada; el browse no cambia. ¿Cual es el error que te presenta? El valor que le envía la función que mencionas, asumo que es numérico. Saludos
ACTUALIZAR DATOS EN COLUMNA ADICIONAL DE XBROWSE CON QUERY
[quote="FranciscoA":3v18bdx6]José Luis. Utilizo TMySql. He intentado lo que describes, pero no lo he conseguido. Aunque no me da ningún error, no hace nada; el browse no cambia. ¿Cual es el error que te presenta? El valor que le envía la función que mencionas, asumo que es numérico. Saludos[/quote:3v18bdx6] Francisco, cuando el xBrowse contiene completamente una consulta no se pueden modificar los valores de los registros ya que es como si esta de SOLO LECTURA, es solo consulta, launica forma es yendo primero a la tabla y luego actualizando el query, asi si trabaja, es mi caso no puedo hacer eso ya que la data es parte de una consulta y la otra no, esa que no es, es la que necesito cambiar, cuando lo intento asume que es un OBJETO y que no soporta el tipo de dato que le envio, sea numerico o strin, da igual, he puesto la columna con ambos tipos de valores y el reseultado erroneo es el mismo, asumo que la columna se conporta de igual manera que las que son del Query, por eso por los momentos estoy resolviendo alimentando un array con los datos del query y ese array al xBrowse, haber si alguien mas da algun comentario o idea, gracias, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
ACTUALIZAR DATOS EN COLUMNA ADICIONAL DE XBROWSE CON QUERY
[quote:1jtcg581] joseluisysturiz wrote Francisco, cuando el xBrowse contiene completamente una consulta no se pueden modificar los valores de los registros ya que es como si esta de SOLO LECTURA, es solo consulta, launica forma es yendo primero a la tabla y luego actualizando el query, asi si trabaja, es mi caso no puedo hacer eso ya que la data es parte de una consulta y la otra no, esa que no es, es la que necesito cambiar, cuando lo intento asume que es un OBJETO y que no soporta el tipo de dato que le envio, sea numerico o strin, da igual, he puesto la columna con ambos tipos de valores y el reseultado erroneo es el mismo, asumo que la columna se conporta de igual manera que las que son del Query, por eso por los momentos estoy resolviendo alimentando un array con los datos del query[/quote:1jtcg581] Jose Luis. Soy de los que creen que en programación se pueden hacer muuuuuchassss cosas. He estado dandole vueltas al asunto, y creo que tiene solución. ¿Podrías postear esa function donde tratas de actualizar tu columna 5? Saludos.
ACTUALIZAR DATOS EN COLUMNA ADICIONAL DE XBROWSE CON QUERY
Upps... Te he solicitado esa function para asegurarme que es lo que hace, y poderla adaptar al código que he hecho, de manera tal que la solución que pueda ofrecer sea la mas acertada (de acuerdo a mis conocimientos), ya que no dudo que pueden haber otras mejores. Saludos.
ACTUALIZAR DATOS EN COLUMNA ADICIONAL DE XBROWSE CON QUERY
Lo que podes hacer es crear una tabla temporal y llenarla con los datos de la consulta, y luego hacer el browse sobre dicha tabla temporal, y ahi si te va a dejar hacer los cambios que deseas. [code=fw:1bq5abj3]<div class="fw" id="{CB}" style="font-family: monospace;">oApp:<span style="color: #000000;">oServer</span>:<span style="color: #000000;">Execute</span><span style="color: #000000;">&#40;</span> &nbsp; <span style="color: #ff0000;">"CREATE TEMPORARY TABLE IF NOT EXISTS `transi` ("</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"`numero` INT(8) NOT NULL,"</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"`dato1` &nbsp; VARCHAR(3) ,"</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"`dato2` &nbsp; INT(8) NOT NULL,"</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"`dato3` DATE ,"</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"`dato4` &nbsp; INT(3) NOT NULL,"</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"PRIMARY KEY (`numero`) "</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">") ENGINE=INNODB DEFAULT CHARSET=latin1"</span><span style="color: #000000;">&#41;</span><br />oApp:<span style="color: #000000;">oServer</span>:<span style="color: #000000;">Execute</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"INSERT INTO transi (numero,dato1,dato2,dato3,dato4)"</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"SELECT s.numero,a.dnit,a.dnin,a.fecnac,"</span>+; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"s.codafi "</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"FROM solidet s "</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"LEFT JOIN afiliado a ON a.codigo = s.codafi "</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"LEFT JOIN catego c ON c.codigo = a.codcat "</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"LEFT JOIN solicit s1 ON s1.numero = s.numero "</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"WHERE s.numero = "</span> +ClipValue2Sql<span style="color: #000000;">&#40;</span>nnumero<span style="color: #000000;">&#41;</span><span style="color: #ff0000;">")<br />oQryBrw1:= oApp:oServer:Query( "</span><span style="color: #0000ff;">SELECT</span> * <span style="color: #0000ff;">FROM</span> transi <span style="color: #0000ff;">ORDER BY</span> numero<span style="color: #ff0000;">")<br />.<br />.<br />.<br />REDEFINE XBROWSE oBrw1 DATASOURCE oQryBrw1;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COLUMNS "</span>numero<span style="color: #ff0000;">","</span>dato1<span style="color: #ff0000;">","</span>dato2<span style="color: #ff0000;">","</span>dato3<span style="color: #ff0000;">","</span>dato4<span style="color: #ff0000;">";<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HEADERS "</span>Numero<span style="color: #ff0000;">","</span>Dato <span style="color: #000000;">1</span><span style="color: #ff0000;">","</span>Dato <span style="color: #000000;">2</span><span style="color: #ff0000;">","</span>Dato <span style="color: #000000;">3</span><span style="color: #ff0000;">","</span>Dato <span style="color: #000000;">4</span><span style="color: #ff0000;">";<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SIZES 50,40,50,90,70;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ID 139 OF oDlg AUTOSORT <br /></span></div>[/code:1bq5abj3] Espero te sirva la idea. Saludos
ACTUALIZAR DATOS EN COLUMNA ADICIONAL DE XBROWSE CON QUERY
[quote="cmsoft":2981da3j]Lo que podes hacer es crear una tabla temporal y llenarla con los datos de la consulta, y luego hacer el browse sobre dicha tabla temporal, y ahi si te va a dejar hacer los cambios que deseas. [code=fw:2981da3j]<div class="fw" id="{CB}" style="font-family: monospace;">oApp:<span style="color: #000000;">oServer</span>:<span style="color: #000000;">Execute</span><span style="color: #000000;">&#40;</span>   <span style="color: #ff0000;">"CREATE TEMPORARY TABLE IF NOT EXISTS `transi` ("</span>+;<br />                           <span style="color: #ff0000;">"`numero` INT(8) NOT NULL,"</span>+;<br />                           <span style="color: #ff0000;">"`dato1`   VARCHAR(3) ,"</span>+;<br />                           <span style="color: #ff0000;">"`dato2`   INT(8) NOT NULL,"</span>+;<br />                           <span style="color: #ff0000;">"`dato3` DATE ,"</span>+;<br />                           <span style="color: #ff0000;">"`dato4`   INT(3) NOT NULL,"</span>+;<br />                           <span style="color: #ff0000;">"PRIMARY KEY (`numero`) "</span>+;<br />                           <span style="color: #ff0000;">") ENGINE=INNODB DEFAULT CHARSET=latin1"</span><span style="color: #000000;">&#41;</span><br />oApp:<span style="color: #000000;">oServer</span>:<span style="color: #000000;">Execute</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"INSERT INTO transi (numero,dato1,dato2,dato3,dato4)"</span>+;<br />                        <span style="color: #ff0000;">"SELECT s.numero,a.dnit,a.dnin,a.fecnac,"</span>+;                       <br />                        <span style="color: #ff0000;">"s.codafi "</span>+;<br />                        <span style="color: #ff0000;">"FROM solidet s "</span>+;<br />                        <span style="color: #ff0000;">"LEFT JOIN afiliado a ON a.codigo = s.codafi "</span>+;<br />                        <span style="color: #ff0000;">"LEFT JOIN catego c ON c.codigo = a.codcat "</span>+;<br />                        <span style="color: #ff0000;">"LEFT JOIN solicit s1 ON s1.numero = s.numero "</span>+;<br />                        <span style="color: #ff0000;">"WHERE s.numero = "</span> +ClipValue2Sql<span style="color: #000000;">&#40;</span>nnumero<span style="color: #000000;">&#41;</span><span style="color: #ff0000;">")<br />oQryBrw1:= oApp:oServer:Query( "</span><span style="color: #0000ff;">SELECT</span> * <span style="color: #0000ff;">FROM</span> transi <span style="color: #0000ff;">ORDER BY</span> numero<span style="color: #ff0000;">")<br />.<br />.<br />.<br />REDEFINE XBROWSE oBrw1 DATASOURCE oQryBrw1;<br />          COLUMNS "</span>numero<span style="color: #ff0000;">","</span>dato1<span style="color: #ff0000;">","</span>dato2<span style="color: #ff0000;">","</span>dato3<span style="color: #ff0000;">","</span>dato4<span style="color: #ff0000;">";<br />          HEADERS "</span>Numero<span style="color: #ff0000;">","</span>Dato <span style="color: #000000;">1</span><span style="color: #ff0000;">","</span>Dato <span style="color: #000000;">2</span><span style="color: #ff0000;">","</span>Dato <span style="color: #000000;">3</span><span style="color: #ff0000;">","</span>Dato <span style="color: #000000;">4</span><span style="color: #ff0000;">";<br />          SIZES 50,40,50,90,70;<br />          ID 139 OF oDlg AUTOSORT <br /></span></div>[/code:2981da3j] Espero te sirva la idea. Saludos[/quote:2981da3j] cMsoft: Muy acertado. En mi caso, normalmente uso tablas temporales. El caso es que me llama la atención el requerimiento de Jose Luis, y he hecho algunas pruebas. El resultado es el siguiente: (solo demuestra que se puede modificar datos en la columna que no es de la consulta, pero solo para reemplazar todas las lineas de esa columna en el browse) [code=fw:2981da3j]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//-----------------------------</span><br /><span style="color: #00C800;">FUNCTION</span> PRUEBA<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> oC:=oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"SELECT * FROM recibosc LIMIT 6 ;"</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oDlg, oBrw, oCol<br /><br />  XbrNumFormat<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'A'</span>, .t. <span style="color: #000000;">&#41;</span><br />  <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"ENTRADAS"</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"PRUEBA"</span>  TRANSPARENT<br /><br />  <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">ID</span> <span style="color: #000000;">181</span> <span style="color: #0000ff;">OF</span> oDlg ;  <br />      COLUMNS <span style="color: #ff0000;">"FECHEMIS"</span>,<span style="color: #ff0000;">"NUMDOC"</span>,<span style="color: #ff0000;">"HABER"</span> ;<br />      OBJECT oC CELL LINES<br /><br />  oBrw:<span style="color: #000000;">SetMySql</span><span style="color: #000000;">&#40;</span>oC,.f.<span style="color: #000000;">&#41;</span><br /><br />   oCol := oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oCol:<span style="color: #000000;">cHeader</span>       := <span style="color: #ff0000;">"PRUEBA"</span><br />   oCol:<span style="color: #000000;">bEditValue</span>      := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><br />   oCol:<span style="color: #000000;">cEditPicture</span>    := <span style="color: #ff0000;">"@Z 99,999.99"</span> <br />   oCol:<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br />   oCol:<span style="color: #000000;">nDataStrAlign</span> := AL_RIGHT<br />   oCol:<span style="color: #000000;">nWidth</span>        := <span style="color: #000000;">70</span><br /><br />  <span style="color: #0000ff;">REDEFINE</span> BUTTONBMP <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Calcular"</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">230</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oCol:<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">&#123;</span>|| CALCULE<span style="color: #000000;">&#40;</span>oC,.t.<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />  <span style="color: #0000ff;">REDEFINE</span> BUTTONBMP <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Borrar"</span>   <span style="color: #0000ff;">ID</span> <span style="color: #000000;">231</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oCol:<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span>, oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />  <span style="color: #0000ff;">REDEFINE</span> BUTTONBMP <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Salir  "</span>  <span style="color: #0000ff;">ID</span> <span style="color: #000000;">235</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <br /><br />  <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDLG <span style="color: #0000ff;">CENTERED</span> <br /><br />  XXX<span style="color: #000000;">&#40;</span>oBrw<span style="color: #000000;">&#41;</span><br /><br />  oC:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><span style="color: #B900B9;">//--------------------------------</span><br /><span style="color: #00C800;">FUNCTION</span> CALCULE<span style="color: #000000;">&#40;</span>oC,lCalc<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Return</span>  <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>lCalc, oC:<span style="color: #000000;">Haber</span> * <span style="color: #000000;">2</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//--------------------------------</span><br /><span style="color: #00C800;">function</span> XXX<span style="color: #000000;">&#40;</span>oBrw<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> n,aa:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>  <br />oBrw:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">for</span> n:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> oBrw:<span style="color: #000000;">nLen</span><br />   aadd<span style="color: #000000;">&#40;</span>aa,oBrw:<span style="color: #000000;">Prueba</span>:<span style="color: #000000;">Value</span><span style="color: #000000;">&#41;</span><br />   oBrw:<span style="color: #000000;">Skip</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">next</span><br /><span style="color: #0000ff;">xBrowse</span><span style="color: #000000;">&#40;</span>aa,<span style="color: #ff0000;">"Prueba"</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /> </div>[/code:2981da3j] Saludos.
ACTUALIZAR DATOS EN COLUMNA ADICIONAL DE XBROWSE CON QUERY
José Luis. Por otro lado, si usas tabla temporal, como sugiere cmsoft, podrías hacer lo siguiente: Crear la tempo basada en la consulta, e inmediatamente modificarla, agregando las columnas que necesitas. Ej: [code=fw:2j0olcbh]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp;cTbTemp :=cCreaTbTemp<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"TablaFuente"</span>,.t.<span style="color: #000000;">&#41;</span> &nbsp; <span style="color: #B900B9;">//function de usuario para crear tablas temporales</span><br /><br />&nbsp;oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"ALTER TABLE "</span> +cTbTemp+ <span style="color: #ff0000;">" ADD TuColumna NUMERIC(10,2) NULL DEFAULT 0.00 ;"</span><span style="color: #000000;">&#41;</span> &nbsp; <span style="color: #B900B9;">//aqui la modificamos</span><br /><br />&nbsp; oTbTemp:= oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"SELECT * FROM "</span> + cTbTemp + <span style="color: #ff0000;">";"</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<span style="color: #B900B9;">// aqui hacemos la consulta, ya con las columnas agregadas</span><br />&nbsp;</div>[/code:2j0olcbh] Espero te sirva de guía. Saludos.
ACTUALIZAR DATOS EN COLUMNA ADICIONAL DE XBROWSE CON QUERY
Francisco, cMsoft, hacer lo de la tabla temporal tambien ya lo pense pero no me sirve, voy colocar una imagen haber si se entiende mejor lo que requeria, como ya dije antes alimentando el array con el Query y esta se refresca cada vez que hay ciertos cambios, esta trabajando todo bien. Cual es el punto, el sistema es algo sistema venta de piza, pero en este caso con cachapas (producto de maiz), hay un menu de los productos que se ofrecen y al igual que una piza se van agregando ingredientes y estos hacen que el producto vaya cambando de precio ya que cada ingrediente tiene un precio, pero a la vez estos ingredientes se pueden ir acabando y el sistema de forma automatica controla la existencia, si ya no queda lo saca de los ingredientes para la ( piza/cachapa ) y a su vez un producto principal tambien se puede acabar y hay que sacarlo del menu, por eso es que se actualiza el query cada momento, ya que venden varias personas a la vez, si trabajo con una tabla temporal veo en su momento solo lo que esta contiene y no los datos de existencia reales, se que las consultas en si no se les pueden modificar las columnas, pero el caso es que esta columna no es de la consulta y debo cambiar su valor dinamicamente ya que es donde da el precio final del producto con sus ingredientes...como repito, con el array esta funcionando bien, pero para hacer los WHERE del menu tengo que estar vaciando y llenando el array cada momento con los datos necesarios...si hay solucion lo cambiare luego, si no...ni modo, trabajare como esta en estos momento, igual gracias a ambos por las ideas... Francisco, para la intencion de cambiar la columna que no es del query cuando estaba el query, es simplemente como lo expuse antes en una linea: oBrw:aArrayData[oBrw:nArrayAt, 5] := xValor o oBrw:aCols[5]:Value := xValor con el array funciona muy bien [code=fw:31wl5t6j]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrwMnu:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span>oBrwMnu:<span style="color: #000000;">nArrayAt</span>, <span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> := oBrwIP:<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;">nTotal</span> + oBrwMnu:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span>oBrwMnu:<span style="color: #000000;">nArrayAt</span>, <span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span><br /><br /><span style="color: #B900B9;">// COLUMNA ADICIONAL EN LE xBrwMenu que no es de la consulta...</span><br />oBrwMnu:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span>oBrwMnu:<span style="color: #000000;">nArrayAt</span>, <span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span><br /><br /><span style="color: #B900B9;">// VALORES POR LOS CUALES REEMPLAZO DESDE OTRO Xbrw</span><br />oBrwIP:<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;">nTotal</span> + oBrwMnu:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span>oBrwMnu:<span style="color: #000000;">nArrayAt</span>, <span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span><br />&nbsp;</div>[/code:31wl5t6j]
ACTUALIZAR FOOTERS EN XBROWSE
HOLA A TODOS TENGO UNA VENTANA USANDO XBROWSE, LA CUAL DISPONE DE UNA BARRA DE BOTONES DE ALTAS, BAJAS Y MODIFICACIONES. USO FWH 8.10... COMO ACTUALIZO EL VALOR TOTAL DE UNA COLUMNA DE UN FOOTER, EJEMPLO TENGO UN CAMPO QUE SE LLAMA IMPORTE, LUEGO A ESTE CAMPO POR MEDIO DE CODIGO HAGO QUE SE TOTALIZE.. oCol:importe:oTotal:= ntotal, el problema es que cuando ingreso, modifico o elimino, este total en el footer no se actualiza o no se hacer como para que se actualize.... Ya que con recursos el footer no funciona, sale un valor .t. ... Salu2 Francis
ACTUALIZAR FOOTERS EN XBROWSE
Francis: Mira este post. Quizá te sirva de guía. <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=13246&hilit=ejemplo+funcional">viewtopic.php?f=6&t=13246&hilit=ejemplo+funcional</a><!-- l --> Saludos
ACTUALIZAR FOOTERS EN XBROWSE
Hola dé nuévo él éjémplo ésta bién para usar él browsé diréctaménté, péro mi altas bajas y modif. és con barra dé botonés, y cuando ingréso a un boton dé ingréso por éjémplo, grabo un régistro y al salir dél dialogo no sé actualiza él footér con él total activado... Otra cosa ésté browsé qué téngo usa busquéda incréméntal péro quiéro qué lo qué digito aparésca én la barra dé éstado dé la véntana dondé ésta él browsé, sé qué és con oSéék, péro no sé como hacérlo aparécér én la barra dé éstado... Salu2 Francis
ACTUALIZAR FOOTERS EN XBROWSE
aqui parte del codigo [code=fw:2g8rqhei]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; <span style="color: #000000;">&#40;</span> cAliVta <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> DBSetOrder<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"LIN"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; nTotRV := SumTotRV<span style="color: #000000;">&#40;</span> cAliVta, .T. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Ms Sans Serif"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-05</span><br />&nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">ICON</span> oIcon <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"VENTAS"</span><br />&nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">CURSOR</span> oCursor <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Mano"</span><br />&nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"GRADIEN"</span><br /><br />&nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWChild;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">TITLE</span> OToA<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Registro de Ventas Mes de "</span>+cMes+<span style="color: #ff0000;">"/"</span>+IIF<span style="color: #000000;">&#40;</span> nAnio == <span style="color: #000000;">1</span>, STR<span style="color: #000000;">&#40;</span> cAnio <span style="color: #000000;">&#41;</span>, ALLTRIM<span style="color: #000000;">&#40;</span> STR<span style="color: #000000;">&#40;</span> cAnio + <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MDICHILD</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NOZOOM;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NOICONIZE;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"N/W"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ICON</span> oIcon;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oVentana<br /><br />&nbsp; SET <span style="color: #0000ff;">FONT</span> <span style="color: #0000ff;">OF</span> oWChild <span style="color: #0000ff;">TO</span> oFont<br /><br />&nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBarra;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oWChild;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">60</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">2007</span><br /><br />&nbsp; oBarra:<span style="color: #000000;">bClrGrad</span> := &nbsp;<span style="color: #000000;">&#123;</span> | lInvert | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! lInvert, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.10</span>,<span style="color: #000000;">8404992</span>,<span style="color: #000000;">16777215</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.10</span>,<span style="color: #000000;">16777215</span>,<span style="color: #000000;">8404992</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.50</span>,<span style="color: #000000;">33023</span>,<span style="color: #000000;">16777215</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.50</span>,<span style="color: #000000;">16777215</span>,<span style="color: #000000;">33023</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; oBarra:<span style="color: #000000;">nClrText</span> := <span style="color: #000000;">0</span><br /><br />&nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBar<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oBarra;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"NEWDOC"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> MCLICK<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, AMRegVentas<span style="color: #000000;">&#40;</span> oBrw, .T., cMes, nAnio, nReg, cAliVta, cAliVde <span style="color: #000000;">&#41;</span>, nTotRV:= SumTotRV<span style="color: #000000;">&#40;</span> cAliVta, .F. <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GROUP;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Ingreso"</span><br /><br />&nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBar<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oBarra;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"WRITE"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> MCLICK<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, AMRegVentas<span style="color: #000000;">&#40;</span> oBrw, .F., cMes, nAnio, nReg, cAliVta, cAliVde <span style="color: #000000;">&#41;</span>, nTotRV := SumTotRV<span style="color: #000000;">&#40;</span> cAliVta, .F. <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Modifica"</span><br /><br />&nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBar<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oBarra;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"STOP"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> MCLICK<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, BORegVentas<span style="color: #000000;">&#40;</span> cAliVta, cAliVde, <span style="color: #ff0000;">"esta Venta"</span>, cMes, nAnio <span style="color: #000000;">&#41;</span>, nTotRV := SumTotRV<span style="color: #000000;">&#40;</span> cAliVta, .F. <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Elimina"</span><br /><br />&nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBar<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oBarra;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"DOOR"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> MCLICK<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, lSalir := .T., oBrw:<span style="color: #000000;">cAlias</span> := <span style="color: #ff0000;">""</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FErase<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"TEMPRV"</span>+LTRIM<span style="color: #000000;">&#40;</span> STR<span style="color: #000000;">&#40;</span> NREG <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">".DBF"</span> <span style="color: #000000;">&#41;</span>, oWChild:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Salir"</span><br /><br />&nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBar<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oBarra;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"IPRIMERO"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> MCLICK<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GROUP;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Primero"</span><br /><br />&nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBar<span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oBarra;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"IULTIMO"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> MCLICK<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">GoBottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Ultimo"</span><br /><br />&nbsp; SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">" Buscando : "</span> <span style="color: #0000ff;">OF</span> oWChild <span style="color: #000000;">2007</span><br />* &nbsp;oWChild:<span style="color: #000000;">oMsgBar</span>:<span style="color: #000000;">cMsgDef</span> := <span style="color: #ff0000;">" Buscando : "</span>+oBrw:<span style="color: #000000;">bSeek</span><br />* &nbsp;oWChild:<span style="color: #000000;">oMsgBar</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />* &nbsp;oWChild:<span style="color: #000000;">oMsgBar</span>:<span style="color: #0000ff;">Paint</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; @ <span style="color: #000000;">00</span>, <span style="color: #000000;">00</span> <span style="color: #0000ff;">XBROWSE</span> oBrw;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FIELDS <span style="color: #000000;">&#40;</span> cAliVta <span style="color: #000000;">&#41;</span>->LIN, <span style="color: #000000;">&#40;</span> cAliVta <span style="color: #000000;">&#41;</span>->DIA+<span style="color: #000000;">&#40;</span> cAliVta <span style="color: #000000;">&#41;</span>->MES+<span style="color: #000000;">&#40;</span> cAliVta <span style="color: #000000;">&#41;</span>->ANO, <span style="color: #000000;">&#40;</span> cAliVta <span style="color: #000000;">&#41;</span>->CODDOC, <span style="color: #000000;">&#40;</span> cAliVta <span style="color: #000000;">&#41;</span>->SERIE, <span style="color: #000000;">&#40;</span> cAliVta <span style="color: #000000;">&#41;</span>->NRODOC, <span style="color: #000000;">&#40;</span> cAliVta <span style="color: #000000;">&#41;</span>->RUC, IIF<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> cAliVta <span style="color: #000000;">&#41;</span>->CLIENTE = <span style="color: #ff0000;">" "</span>, <span style="color: #ff0000;">"Comprobante Anulado"</span>,<span style="color: #000000;">&#40;</span> cAliVta <span style="color: #000000;">&#41;</span>->CLIENTE <span style="color: #000000;">&#41;</span>, STR<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> cAliVta <span style="color: #000000;">&#41;</span>->CODVTA1, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, TransForm<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> cAliVta <span style="color: #000000;">&#41;</span>->IMPORTE, <span style="color: #ff0000;">"9,999,999.99"</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HEADERS OToA<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"L¡nea"</span><span style="color: #000000;">&#41;</span>, OToA<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Emisi¢n"</span><span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"C/D"</span>, <span style="color: #ff0000;">"SERIE"</span>, <span style="color: #ff0000;">"No Documento"</span>, <span style="color: #ff0000;">"RUC"</span>, <span style="color: #ff0000;">"CLIENTE"</span>,<span style="color: #ff0000;">"OPE"</span>, <span style="color: #ff0000;">"TOTAL"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FIELDSIZES <span style="color: #000000;">40</span>, <span style="color: #000000;">60</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">40</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">80</span>, <span style="color: #000000;">150</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">95</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp;JUSTIFY .T., .F., AL_CENTER, .F., .F., .F., .F., AL_CENTER, .T.;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">COLOR</span> CLR_BLACK, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">200</span>,<span style="color: #000000;">200</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oWChild;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ALIAS</span> cAliVta FOOTERS AUTOSORT;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">LEFT</span> DBLCLICK<span style="color: #000000;">&#40;</span> MCLICK<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, AMRegVentas<span style="color: #000000;">&#40;</span> oBrw, .F., cMes, nAnio, nReg, cAliVta, cAliVde <span style="color: #000000;">&#41;</span>, SumTotRV<span style="color: #000000;">&#40;</span> cAliVta <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WITH OBJECT oBrw<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bSeek</span> := <span style="color: #000000;">&#123;</span>|c| DbSeek<span style="color: #000000;">&#40;</span> Upper<span style="color: #000000;">&#40;</span> c <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">oSeek</span> := oWChild:<span style="color: #000000;">oMsgBar</span> <span style="color: #B900B9;">// ---> aqui quiero que salga en la barra de mensajes de la ventana</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">&#123;</span> | nKey, nFlags | ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IIF<span style="color: #000000;">&#40;</span> nKey == <span style="color: #000000;">13</span>,; <span style="color: #B900B9;">// [Enter]</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span> MCLICK<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, AMRegVentas<span style="color: #000000;">&#40;</span> oBrw, .F., cMes, nAnio, nReg, cAliVta, cAliVde <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; IIF<span style="color: #000000;">&#40;</span> nKey == <span style="color: #000000;">46</span>,; <span style="color: #B900B9;">// [DEL]</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span> MCLICK<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, BORegVentas<span style="color: #000000;">&#40;</span> cAliVta, cAliVde, <span style="color: #ff0000;">"esta Venta"</span>, cMes, nAnio <span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #0000ff;">Refresh</span><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; IIF<span style="color: #000000;">&#40;</span> nKey == <span style="color: #0000ff;">ASC</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"N"</span><span style="color: #000000;">&#41;</span> .AND. GetKeyState<span style="color: #000000;">&#40;</span> VK_CONTROL <span style="color: #000000;">&#41;</span>,; <span style="color: #B900B9;">// [CTRL+N]</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span> MCLICK<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, AMRegVentas<span style="color: #000000;">&#40;</span> oBrw, .T., cMes, nAnio, nReg, cAliVta, cAliVde <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; IIF<span style="color: #000000;">&#40;</span> nKey == <span style="color: #0000ff;">ASC</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"M"</span><span style="color: #000000;">&#41;</span> .AND. GetKeyState<span style="color: #000000;">&#40;</span> VK_CONTROL <span style="color: #000000;">&#41;</span>,; <span style="color: #B900B9;">// [CTRL+M]</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span> MCLICK<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, AMRegVentas<span style="color: #000000;">&#40;</span> oBrw, .F., cMes, nAnio, nReg, cAliVta, cAliVde <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; IIF<span style="color: #000000;">&#40;</span> nKey == <span style="color: #0000ff;">ASC</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"S"</span><span style="color: #000000;">&#41;</span> .AND. GetKeyState<span style="color: #000000;">&#40;</span> VK_CONTROL <span style="color: #000000;">&#41;</span>,; <span style="color: #B900B9;">// [CTRL+S]</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span> MCLICK<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, lSalir := .T., oWChild:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;END<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WITH OBJECT oBrw:<span style="color: #000000;">TOTAL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">nTotal</span> &nbsp; := nTotRV &nbsp;<span style="color: #B900B9;">// variable que suma el total del campo importe</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">lTotal</span> &nbsp; := .t. &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// activa el total , pero al sali de un boton cualquiera no actualiza el footer....</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">nFootStrAlign</span> := AL_RIGHT<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;END<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">oCol</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"CLIENTE"</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">cFooter</span> := <span style="color: #ff0000;">" TOTAL VENTAS : "</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">oCol</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"CLIENTE"</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">nFootStrAlign</span> := AL_RIGHT<br />&nbsp;&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">bClrGrad</span> := <span style="color: #000000;">&#123;</span> | lInvert | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! lInvert, ;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1.00</span>,<span style="color: #000000;">8388608</span>,<span style="color: #000000;">16054371</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">1.00</span>,<span style="color: #000000;">16054371</span>,<span style="color: #000000;">8388608</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.50</span>,<span style="color: #000000;">32768</span>,<span style="color: #000000;">16054371</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.50</span>,<span style="color: #000000;">16054371</span>,<span style="color: #000000;">32768</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">bClrHeader</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> <span style="color: #000000;">65535</span>, <span style="color: #000000;">0</span> &nbsp;<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">bClrfooter</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> <span style="color: #000000;">65535</span>, <span style="color: #000000;">0</span> &nbsp;<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">nHeaderHeight</span> := <span style="color: #000000;">35</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">SetRdd</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">SetBackGround</span><span style="color: #000000;">&#40;</span> oBrush <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWChild:<span style="color: #000000;">SetControl</span><span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; oBar<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cToolTip</span> = <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"INGRESA VENTA NUEVA"</span>, <span style="color: #ff0000;">"CiberSoft"</span>, <span style="color: #000000;">1</span>, rgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span>, rgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">58</span>,<span style="color: #000000;">116</span>,<span style="color: #000000;">241</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; oBar<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cToolTip</span> = <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"MODIFICA UNA VENTA"</span>, <span style="color: #ff0000;">"CiberSoft"</span>, <span style="color: #000000;">1</span>, rgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span>, rgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">58</span>,<span style="color: #000000;">116</span>,<span style="color: #000000;">241</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; oBar<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cToolTip</span> = <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ELIMINA VENTA"</span>, <span style="color: #ff0000;">"CiberSoft"</span>, <span style="color: #000000;">1</span>, rgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span>, rgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">58</span>,<span style="color: #000000;">116</span>,<span style="color: #000000;">241</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; oBar<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cToolTip</span> = <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"SALIR DE ESTA VENTANA"</span>, <span style="color: #ff0000;">"CiberSoft"</span>, <span style="color: #000000;">1</span>, rgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span>, rgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">58</span>,<span style="color: #000000;">116</span>,<span style="color: #000000;">241</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWChild;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">VALID</span><span style="color: #000000;">&#40;</span> lSalir <span style="color: #000000;">&#41;</span></div>[/code:2g8rqhei] Ayuda por favor .... Salu2 Francis
ACTUALIZAR FOOTERS EN XBROWSE
HOLA A TODOS LA SOLUCION ERA XBROW:OCOL[ NUMERO]:CFOOTER:= NTOTAL DONDE NTOTAL ES UNA VARIABLE NUMERICA QUE ALMACENA LOS REGISTROS SUMADOS... GRACIAS A TODOS SALU2
ACTUALIZAR FWH28
Ya inclui la lib hbsix.lib y la dbffpt.lib a mi script como me lo indico William morales y ya quedo resuelto ese tema, mil gracias, ahora en lo referente a la TWbrowse de Hernan el error que me marca es: unresolved external _hb_stack en wbrwline Alguna idea??? Saludos !!! LCP Eduardo Borondón Muñiz
ACTUALIZAR FWH28
Eduardo, Prueba a incluir este código en tu PRG: [code:13rk71f2] #pragma BEGINDUMP #include "hbstack&#46;h" #include "hbapiitm&#46;h" void * hb_stack = &HB_VM_STACK; #pragma ENDDUMP [/code:13rk71f2]
ACTUALIZAR FWH28
no me hagas mucho caso, pero creo que tendiras que volver a generar la libreria del WBrowse de Hernan con la nueva version de FW
ACTUALIZAR FWH28
Gracias Antonio: Incluí el codigo que me indicas y ya esta funcionando, Gracias!!!! Saludos !!! LCP Eduardo Borondón Muñiz
ACTUALIZAR VALOR DE FOOTER EN TSBROWSE
Buenas noches amigos de foroQuiero actualizar el footer de una columna que nunca edito es decir no puedo utilizar el preedit ni posedit, cargo el vector cada que presiono un boton y en ese momento quiero que se actualizar el footer e intentado de todoADD COLUMN TO BROWSE oBrw ARRAY ELEMENT 5 PICT "99,999,999.99" ; HEADER oemtoansi("Saldo") WIDTH 100 ; ALIGN DT_CENTER ; MOVE DT_MOVE_DOWN; COLORS CLR_RED,CLR_HGRAY; FOOTER { || aSaldo += Sumasaldo( aTestData,oBrw,oDlg) } // activando footers oBrw:lFooting := .T. oBrw:aColumns[ 2 ]:cFooting := "Saldo Total.."* oBrw:Acolumns[ 5 ]:cFooting := { || LTrim( Transform( aSaldo, "#,###,###.##" ) ) }* oBrw:aDefault := {0,0,0,0,{ || aSaldo:= Sumasaldo( aTestData,oBrw,oDlg),oBrw:DrawFooters(),0 } }* oBrw:Acolumns[ 5 ]:cFooting := { || LTrim( Transform( aSaldo, "#,###,###.##" ) ),oBrw:DrawFooters() }* FOOTER { | uVal | aSaldo += ( uVal - aSaldo ),Sumasaldo( aTestData,oBrw,oDlg) }* FOOTER { || Ltrim( Str( aSaldo,9,2 )) }
ACTUALIZAR VALOR DE FOOTER EN TSBROWSE
Oscar intenta :*--// Defino FooteroBrw:aColumns[3]:cFooting:={ || tran( op:nTotCap,'9999,999.99') }*--// Modifico variable y pinto de nuevo el Footerop:nTotCap:=Suma()oBrw4:DrawFooters()Espero te sirva, saludosJoel Andujo[/url]
ACTUALIZAR VALOR DE FOOTER EN TSBROWSE
Joel Primero gracias por tu respuesta, lo he probado pero no me funciona lo estoy haciedo de esta manera. ADD COLUMN TO BROWSE oBrw ARRAY ELEMENT 5 PICT "99,999,999.99" ; HEADER oemtoansi("Saldo") WIDTH 100 ; ALIGN DT_CENTER ; MOVE DT_MOVE_DOWN; COLORS CLR_RED,CLR_HGRAY // activando footers oBrw:lFooting := .T.*--// Defino Footer oBrw:aColumns[5]:cFooting:={ || tran( aSaldo,'9999,999.99') } *--// Modifico variable y pinto de nuevo el Footer*aSaldo := Sumasaldo( aTestData,Obrw,oDlg)*oBrw:DrawFooters()y el draw en la funcion por que en el browse de daun errorFUNCTION carga_mes(manio,oBrwp,aTestData,mcuenta)local SetArray,j,mesdsc,mmes,asaldoaTestData:= {}DBSELECTAREA("tmeses")ordSetfocus("imeses")dbgotop()DBSELECTAREA("ttotmens")ordSetfocus("itotmen1")dbgotop()oBrwp:SetArray( aTestdata )FOR J = 0 to 12 mmes := RTRIM(LTRIM(str(j,2))) IF len(mmes) = 1 mmes := '0'+mmes endif DBSELECTAREA("tmeses") ordSetfocus("imeses") dbgotop() dbseek(mmes) mesdsc := tmeses->mesdesc DBSELECTAREA("ttotmens") ordSetfocus("itotmen1") dbgotop() dbseek(space(4)+mcuenta+manio+mmes) aAdd(aTestdata,{mmes,mesdsc,ttotmens->tddebe,ttotmens->tdhaber,ttotmens->tddebe-ttotmens->tdhaber})NEXTaSaldo := 0.00AEval( aTestData, {|aItem| asaldo += aItem[5] } )*aSaldo := Sumasaldo( aTestData,Obrwp,oDlg)?? aSaldooBrwp:DrawFooters() oBrwp:SetArray( aTestdata )oBrwp:ResetBarPos()oBrwp:Refresh()return nilSi algo esta mal o hay otra manera agradeceria tu ayuda
ACTUALIZAR VALOR DE FOOTER EN TSBROWSE
[quote="EASYSOFT":3o3ilji8]Quiero actualizar el footer de una columna que nunca edito es decir no puedo utilizar el preedit ni posedit[/quote:3o3ilji8]Puedes actualizar el footer de una columna desde la edición de otra(s), sobre todo si la edición de dicha(s) columna(s) afecta el valor del footer de la columna en cuestión. [quote="EASYSOFT":3o3ilji8] cargo el vector cada que presiono un boton y en ese momento quiero que se actualizar el footer e intentado de todo[/quote:3o3ilji8]También puedes actualizar el valor del footer desde una función ajena al browse, solamente tendrás que refrescar el footer con oBrw:DrawFooters() o con oBrw:Refresh() [quote="EASYSOFT":3o3ilji8]* oBrw:aDefault := {0,0,0,0,{ || aSaldo:= Sumasaldo( aTestData,oBrw,oDlg),oBrw:DrawFooters(),0 } } * oBrw:Acolumns[ 5 ]:cFooting := { || LTrim( Transform( aSaldo, "#,###,###.##" ) ),oBrw:DrawFooters() }[/quote:3o3ilji8]El codeblock que asigna el valor al footer, debe devolver el dato correcto. Ya que estoy viendo que el codeblock que defines devuelve una referencia al mismo browse (oBrw:DrawFooters), quita esa instrucción del codeblock y llamala externamente aprovechando algún otro evento, preferentemente desde la(s) funcion(es) que modifica(n) el valor del footer.Un abrazao.Manuel Mercado.
ACTUALIZAR VALOR DE FOOTER EN TSBROWSE
Listo FuncionoGracias JoelGracias Sr. Mercado