topic
stringlengths
1
63
text
stringlengths
1
577k
Comparativa de diseñadores de reportes
[quote="AngelSalom":2i0d2ypc]¿Alguna demo para probar FastReport? Lo cierto es que nunca he usado una librería externa y con tanto halago hacia esa utilidad me están entrando ganas de testearla. Gracias,[/quote:2i0d2ypc] Angel <!-- m --><a class="postlink" href="http://www.spirins.com/">http://www.spirins.com/</a><!-- m -->
Comparativa de diseñadores de reportes
Mi idea es muy simple, ver hasta donde podemos llegar haciendo un GUI para la Clase TReport de FWH. Es solo un punto de partida, y de paso entre todos analizamos lo que de verdad se necesita y lo que es superfluo <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Comparativa de diseñadores de reportes
[quote="Joaquim Ferrer":1eq24mdz] Angel <!-- m --><a class="postlink" href="http://www.spirins.com/">http://www.spirins.com/</a><!-- m -->[/quote:1eq24mdz] Gracias!
Comparativa de diseñadores de reportes
De los diseñadores de informes que yo he probado (List & Label, Crystal Reports, Fast Report), sin duda me quedo con Fast Report, por muchisimos motivos, de los cuales la mayoria ya se han comentado, pero expecialmente su facil integración con Harbour, su potente editor de informes y la gran facilidad de redistribución (una sola dll, sin instalación). Tambien he sido y sigo siendo usuario de la clase tReport, que para según que tipo de listado es muy rápido en diseñar (a mano) y consigo el resultado deseado. Creo que hablados de dos cosas distintas, y un GUI de tReport, nunca se acercara a Fast Report. Dicho esto me parece genial el dotar de herramientas que facilten el diseño de reportes, pero para mi seria más importante dar continuidad al trabajo de Sergey(parece ser que no es posible), o crear un proyecto nuevo integrado en FiveWin para tener acceso a las ultimas versiones de Fast Report, de la misma manera que X_ailer ya lo ha hecho.
Comparativa de diseñadores de reportes
Biel, Yo entiendo que hay que optar por máxima funcionalidad con el menor esfuerzo posible, y de ahí que FastReport parece que es el más usado. Pero usar un producto basado en Delphi, en una DLL sin código fuente, cuyo "adaptador" ya no está entre nosotros, me parece bastante "parche" <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Pero lo dicho, si funciona, entiendo que lo useis <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Comparativa de diseñadores de reportes
Si la mayoria quiere FastReport, pues habrá que considerarlo seriamente <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Comparativa de diseñadores de reportes
[quote="Antonio Linares":1uup15im]Biel, ... Pero usar un producto basado en Delphi, en una DLL sin código fuente, cuyo "adaptador" ya no está entre nosotros, me parece bastante "parche" <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> ... [/quote:1uup15im] El que este basado en Delphi, o cualquier otro lenguaje no me preocupa en exceso (más bien nada), depender de un tercero distinto al fabricante y que por desgracia ya no está entre nosotros, si me preocupa (bastante). Tienes toda la razón, auque en su dia fue una muy buena inversión. A dia de hoy y con la desaparición de Sergey parece estar en una mala situación.
Comparativa de diseñadores de reportes
Lo ideal es q trabajemos para volver a realizar el trabajo de Sergey, y poder conectar fácilmente FW con FastReport. Seguro q si el lo consiguió la comunidad de FW también lo podrá hacer. Saludos.
Comparativa de diseñadores de reportes
Hola, Tuve hace poco una experiencia en montar un diseñador. Sobre él ya hize varios comentarios al respeto en su dia. Durante el proyecto me iban apareciendo nuevas necesidades y necesitava rediseñar muchas partes, todo esto fue producto de la inexperiencia de haber diseñado alguna vez alguno o saber realmente hasta donde queria llegar. Desgraciadamente termine readaptandolo a mis necesidades y manera de trabajar. Ahora tengo mas claro como debe o deberia de ser, pero mas claro tengo que con FWH SI se puede realizar. El problema es que se trata de un proyecto de diseño de todo un programa con los correspondientes recursos ue implica y que tenga la capacidad de integrarse completamente con nuestras aplicaciones. Es un proyecto complicado por muy sencillo que lo quieras diseñar pero tampoco tenemos de marcarnos la idea de imitar a FastReport (para mi, el mejor) pero del cual si podemos aprender. Y conceptualmente tengo muy claro que deberia de hacer: 1.- Diseñador de formularios -> Donde queremos y como queremos que se imprime las datos 2.- Motor de impresión de los datos -> Donde se imprimiran los datos: Datos estaticos en el formulario (ejemplo cabeceras, pies,...) y datos dinamicos (ejemplo posiciones detalle, subdetalle, ...). No creo necesario ni importante que lleve un motor propio de datos, puesto que nuestras aplicaciones constantemente accedemos a multiples origenes de datos distintos, teniendo nosotros la capacidad de facilmente leer desde haya donde nosotros necesitamos, y esta facilidad creo que seria complicada meterla en un motor de la libreria. Creo que la mejor idea es que nosotros desde el programa accedamos a los datos como siempre, y se lo pasemos a la clase para que este se encargue de imprimirla alla donde toque. Basicamente....
Comparativa de diseñadores de reportes
Biel, Manuel, Desde un punto de vista de la funcionalidad de un reporte, ¿ que funcionalidades ofrece FastReport que no tenga la clase TReport ? No me refiero a las facilidades que ofrezca el diseñador, sino a lo que precise el reporte a hacer. Creo que vuestras opiniones como usuarios expertos con FastReport es muy importante y os agradecemos todas las explicaciones, ejemplos, etc que podais comentarnos, gracias <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Comparativa de diseñadores de reportes
Charly, En tus reportes no usastes la Clase TReport de FWH (creo) ? Que le falta a la Clase TReport ? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Tu diseñador (muy bueno) lo veo más como un diseñador de formularios, que de reportes. Es asi ?
Comparativa de diseñadores de reportes
Antonio, Ofrece muchas cosas, a mi entender de las mejores los cálculos q se pueden hacer SUM(...) de columnas, ocultar y mostrar elementos según la condiciones, incluso bandas completas, para hacer informes resumidos. Cálculos en Delphi, creas variables y las vas utilizando, para sumatorios, medias, y lo q se te ocurra. Control de eventos "OnBeforePrint", ..., por cada elemento q tengas en pantalla. Y el editor es brutal, los preview perfectos, y las exportaciones a Excel, HTML, Pdf, etc., las hacer de maravilla. Como decía Rafa y Biel, los mejores 300€ q me he gastado jamas. Saludos.
Comparativa de diseñadores de reportes
Manuel, Por lo que comentas es un gran diseñador de reportes <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> De tus comentarios, leo entre líneas <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> que podriamos tener una cláusula WHEN en las columnas del reporte y en otros elementos. En cuanto a los cálculos, con Harbour tenemos de todo. El evento bOnBeforePrint tambien lo podemos incluir en la Clase TReport, en todos los elementos que queramos <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> La calidad es lógica puesto que es una empresa que solo se dedica a eso <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Usas todas las opciones que ofrece ? Que le ves superfluo ? gracias <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Comparativa de diseñadores de reportes
Buenas, [quote="Antonio Linares":q4ijk0z6]En tus reportes no usastes la Clase TReport de FWH (creo) ? Que le falta a la Clase TReport ? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:q4ijk0z6] Se basa en TPrinter. TReport no se ajustaba a mi idea, que era la de colocar cada columna de detalle donde quisiera dinamicamente, asi como sus subposiciones, ... [quote="Antonio Linares":q4ijk0z6]Tu diseñador (muy bueno) lo veo más como un diseñador de formularios, que de reportes. Es asi ?[/quote:q4ijk0z6] La idea inicial era poder generar modelos tipo factura con master/detail/subdetail <!-- m --><a class="postlink" href="https://dl.dropboxusercontent.com/u/105835468/FWH/CliAlb4.pdf">https://dl.dropboxusercontent.com/u/105 ... liAlb4.pdf</a><!-- m --> Aqui te dejo mi idea en su dia... <!-- m --><a class="postlink" href="https://dl.dropboxusercontent.com/u/105835468/FWH/MyRpt.pdf">https://dl.dropboxusercontent.com/u/105 ... /MyRpt.pdf</a><!-- m -->
Comparativa de diseñadores de reportes
Antonio, Aun no he utilizado la generación de gráficos p.e., q la tiene. Con el tiempo he ido exprimiendo la herramienta, cosas q creía superfluas, ahora no lo son. Es indudable q son personas centradas en la elaboración solo de informes, por tanto el resultado es excelente, de ahí mi insistencia en no reinventar la rueda, solo tenemos q ponerla en nuestro coche, eso si q funciona con FW <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) --> Saludos.
Comparativa de diseñadores de reportes
Charly, gracias por la explicación. Ahora entiendo la limitación que ahi tenias con TReport <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Manuel, Afortunadamente por lo que se ve, FastReport es muy estable. Yo le tengo mucho respeto a los componentes OLE, ActiveX, DLLs, etc... porque me he topado con incontables problemas. Si FastReport es realmente sólido, entonces logicamente es una buena solución <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Nunca os ha dado ningún problema ?
Comparativa de diseñadores de reportes
Antonio, Fast Report no trabaja en 64 bits. En algunos PCS con Windows 8 se cuelga tras trabajar un buen rato con la aplicación. Los PDFS generados no se ven en el IPhone. La exportación en Word no siempre funciona correctamente. Es un buen producto, pero al haber desaparecido Sergey estamos congelados en la última versión que sacó hace casi ya dos años. Un saludo
Comparativa de diseñadores de reportes
Saludos Antonio construi el ejecutable del ejemplo pero se cualga al ejecutar, segun veo me falta Riched20.dll en donde lo ubico no lo encuentro creo que este puede ser el problema. Gracias.
Comparativa de diseñadores de reportes
Buenas tardes, me permito dar mi opinion al respecto Considero que se han tocado los dos temas que a mi entender son fundamentales: - Importantísimo dotar al poderoso TReport que usamos desde hace tantos años de una evolucion necesaria: control de posicion de columnas, alto de fila, control de numeracion de paginas o integracion de variables y eventos, y scripts?, previsualizacion correcta y otros muchos etc. que habitualmente hemos tenido que ir programando cada unos de nosotros. No creo que me equivoque mucho al decir que si pudiéramos recopilarlas entre todos nosotros, nos encontraríamos con muchas versiones de la misma clase y con muchas opciones adicionales que si pudiéramos unir daría lugar a una herramienta muy importante. Es decir, empezar con un buen motor de generación de reportes, informes, formularios o como deseemos llamarlo, y la posibilidad de poder guardar los modelos, creo que con eso tendriamos la mayoria de nuestras necesidades cubiertas inicialmente. - Un GUI, el de Carles me parece un gran, gran trabajo, buena filosofía y presentación, y como base estaba estudiándolo para ver qué podía adaptar a mis necesidades (gracias por tu trabajo). Estoy de acuerdo contigo en que el motor de bases de datos integrado es secundario inicialmente. Dicho esto, estoy seguro, que el trabajo de Antonio dará sus frutos, como siempre, pero seguiríamos cuando lleguemos a utilizarlo lo fundamental: el motor de generacion de reportes, que, como control, se ha quedado un poco atrás en relacion a la evolución que ha tenido el resto, y con carencias que quizás haya sido el principal motivo de que se hayan buscado otras herramientas externas. Abandonar el proyecto FastReport ? , yo particularmente no lo he usado prácticamente, pero lo considero una gran aplicacion (tambien es cierto que se me ha quedado en memoria varias veces en Windows 8 ), que nos puede servir de guía para poder llegar a disponer de una gran herramienta. Si se pudiese evolucionar y darle continuidad sería genial, como tantos otros proyectos que se han ido adaptando a FWH: Scintilla por ejemplo, pero considero que un tema no va en contra del otro (TReport) ya que para "gustos están los colores" y somos también muchos los que preferimos tener herramientas "nativas". Saludos
Comparativa de diseñadores de reportes
Hola Fast-Report lo mejor.. facil de usar e implementar puedes cambiar los reportes en tiempo de ejecucion y nada de andar compilando de nuevo la aplicacion y viendo como queda( mucho tiempo perdido) utilizo win7 64 bit y y no he tenido ningun problema, al enviar al iphone PDF estos no se ven correctamente, pero creo que es un problema del visor del ihone ya que en los mac funciona muy bien, claro que actualice el acrobar reader pero esta herramienta tiene un fin de otras alternativas las que implemente para el iphone es enviar el reporte en jpg funciona mejor que con PDF y todo con FASTREPORT
Comparativa de diseñadores de reportes
No he visto practicamente nunca nada de FastReport pero entiendo que si es una DLL autocontenida, el primer paso sería obtener un listado DEF de la DLL y ver que es lo que exporta. Entiendo que el trabajo que hizo Sergey fué conectarse a esas funciones exportadas, crear los wrappers para ser usadas desde Harbour y finalmente identificar las classes que puedan crearse para simplificar el diseño. En relación al trabajo de Sergey, hay algo oficialmente publicado de su código ? Los que usais FastReport, entiendo que enlazais una librería que os permite usarlo y debiera proporcionar los fuentes para poder recompilarla con versiones más nuevas de Harbour/xHarbour, ó como la usais ? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Comparativa de diseñadores de reportes
[quote="ruben Dario":5ewikt6d]Saludos Antonio construi el ejecutable del ejemplo pero se cualga al ejecutar, segun veo me falta Riched20.dll en donde lo ubico no lo encuentro creo que este puede ser el problema. Gracias.[/quote:5ewikt6d] Hola Rubén, se te cuelga porque falta el .RC. Prueba asi: (previa copia de un Bmp en el dir desde donde pruebas) //DEFINE BITMAP oBmpTiled RESOURCE "background" DEFINE BITMAP oBmpTiled FILENAME ".\background.bmp" Saludos.
Comparativa de diseñadores de reportes
Acabo de leer la licencia de uso de la _DEMO_ de FastReport, y sinceramente yo cuando leo algo asi instintivamente me dan arcadas... <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Por ejemplo, ni siquiera echar un vistazo a la DLL está permitido. Sinceramente, en los tiempos que corren, más que a naftalina esto huele a rancio <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Todas las bendiciones a los que lo usen y les sirva, pero no me siento para nada identificado con esa línea. Afortunadamente algunos (yo diria que muchos) somos distintos. Hoy en dia hasta los fuentes de Darwin de Apple son open source. Vivir en el obscurantismo del pasado, de la bata blanca y del "yo se mas que tu", eso ya es historia afortunadamente en la informática...
Comparativa de diseñadores de reportes
Ruben, Aqui esta el FiveReps.rc que faltaba <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> [code=fw:3v93rcfj]<div class="fw" id="{CB}" style="font-family: monospace;">ico &nbsp;<span style="color: #0000ff;">ICON</span> <span style="color: #ff0000;">"./.<span style="color: #000000;">\.</span>./ICONS/fivewin.ico"</span><br /><br />#ifdef __FLAT__<br />&nbsp; <span style="color: #000000;">1</span> <span style="color: #000000;">24</span> <span style="color: #ff0000;">"WinXP/WindowsXP.Manifest"</span> <br />#endif<br /><br />#ifdef __64__<br />&nbsp; <span style="color: #000000;">1</span> <span style="color: #000000;">24</span> <span style="color: #ff0000;">"WinXP/WindowsXP.Manifest64"</span><br />#endif <br /><br />background BITMAP .\..\<span style="color: #0000ff;">bitmaps</span>\backgrnd\iosbg.bmp<br /><br /><span style="color: #00C800;">new</span> &nbsp; &nbsp; &nbsp;BITMAP .\..\<span style="color: #0000ff;">bitmaps</span>\32x32\<span style="color: #00C800;">new</span>.bmp<br />open &nbsp; &nbsp; BITMAP .\..\<span style="color: #0000ff;">bitmaps</span>\32x32\open.bmp<br />copy &nbsp; &nbsp; BITMAP .\..\<span style="color: #0000ff;">bitmaps</span>\32x32\copy.bmp<br />prev &nbsp; &nbsp; BITMAP .\..\<span style="color: #0000ff;">bitmaps</span>\32x32\prev.bmp<br /><span style="color: #00C800;">next</span> &nbsp; &nbsp; BITMAP .\..\<span style="color: #0000ff;">bitmaps</span>\32x32\<span style="color: #00C800;">next</span>.bmp<br />exit &nbsp; &nbsp; BITMAP .\..\<span style="color: #0000ff;">bitmaps</span>\32x32\exit.bmp<br />run &nbsp; &nbsp; &nbsp;BITMAP .\..\<span style="color: #0000ff;">bitmaps</span>\32x32\run.bmp<br />add &nbsp; &nbsp; &nbsp;BITMAP .\..\<span style="color: #0000ff;">bitmaps</span>\32x32\plus.bmp<br /><span style="color: #00C800;">edit</span> &nbsp; &nbsp; BITMAP .\..\<span style="color: #0000ff;">bitmaps</span>\32x32\<span style="color: #00C800;">edit</span>.bmp<br />del &nbsp; &nbsp; &nbsp;BITMAP .\..\<span style="color: #0000ff;">bitmaps</span>\32x32\minus.bmp<br />database BITMAP .\..\<span style="color: #0000ff;">bitmaps</span>\32x32\database.bmp<br />struct &nbsp; BITMAP .\..\<span style="color: #0000ff;">bitmaps</span>\32x32\setup.bmp<br />code &nbsp; &nbsp; BITMAP .\..\<span style="color: #0000ff;">bitmaps</span>\32x32\source.bmp<br />yes &nbsp; &nbsp; &nbsp;BITMAP .\..\<span style="color: #0000ff;">bitmaps</span>\32x32\yes2.bmp</div>[/code:3v93rcfj]
Comparativa de diseñadores de reportes
[quote="Antonio Linares":mc0bxeq1]Acabo de leer la licencia de uso de la _DEMO_ de FastReport, y sinceramente yo cuando leo algo asi instintivamente me dan arcadas... <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Por ejemplo, ni siquiera echar un vistazo a la DLL está permitido. Sinceramente, en los tiempos que corren, más que a naftalina esto huele a rancio <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Todas las bendiciones a los que lo usen y les sirva, pero no me siento para nada identificado con esa línea. Afortunadamente algunos (yo diria que muchos) somos distintos. [/quote:mc0bxeq1] Esta licencia es en referencia a la DLL de FR para [x]Harbour que vendia Sergey?, o la licencia de Fast Report inc. Entiendo que el PRG y la DLL de FR for [x]Harbour pueden servir como idea incial, pero se deberia contactar con Fast Report Inc. para ver que posibilidades/restricciones hay de usar su producto con FW. Veo que su versión actaul es para .NET y una de las características que menciona es "•Full source code is available. FastReport.Net can be customized to suit your needs", que creo encaja más en tu filosofia. [url:mc0bxeq1]http&#58;//www&#46;fast-report&#46;com/en/product/fast-report-net/[/url:mc0bxeq1]
Comparativa de diseñadores de reportes
Biel, Es de Fast Report Inc. pero entiendo que es extensible al producto de Sergey. Me parece estupendo que ofrezcan los fuentes (eso hace que tanta clausula y licencias sean innecesarias), lo que no me parece es lo de .NET (porque es otro punto de debilidad para la aplicación). No hay forma de usar el producto ahora sin .NET ?
Comparativa de diseñadores de reportes
Antonio, solo 3 archivos son necesarios para FR, un .prg, un .ch y como dices una .dll cerrada totalmente, ese es el mayor problema, quizas contactando a los familiares de Sergey se pueda obtener algo y llegar a un acuerdo sobre las fuentes de la DLL y quizas en vez de empezar desde cero, solo se mejore FR a nuestros dias y sistemas 32 y 64 bits y demas necesidades o mejoras, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Comparativa de diseñadores de reportes
Copiado del groups: [url:3ep2475k]https&#58;//groups&#46;google&#46;com/forum/#!topic/fastreport_for_x_harbour/b_qrd8t_Mo0[/url:3ep2475k] [quote:3ep2475k] On Mar 7, 2013, at 12:11 PM, Jose Manuel García del Valle Irala wrote: Hola Me parece buena idea lo que propones. Tengo entendido que Sergei tenía todo preparado para que cuando se publicaba una versión nueva de fastreports el generaba automáticamente la versión para harbour, xbase y fox. Yo ya le escribí a la mujer de Sergei, y me respondió que estaban esperando a resolver la herencia. Hello, Jose Manuel Garcia del Valle! Thanks for kind words! Now I can't tell about plans for the program. We solve a question of rights of succession. Spirina Elena [/quote:3ep2475k]
Comparativa de diseñadores de reportes
Creo q Fastreport tiene un programa de partners, y cederan la información a los partners, ni idea como la consiguio Sergey. A partir de esa información se podría construir el wrap. Yo lo utilizo en 64b its y no se cuelga. Las exportaciones a word y pdf, nunca me dieron problemas. Realmente el problema ha sido la muerte de Sergey y q el producto no avanza hace un par de años. Ya hay gente escribiendo un wrap para Harbour y creo q pronto van a sacar algo, han visto el nicho de mercado rápido. Saludos.
Comparativa de diseñadores de reportes
Manuel, ¿Quién está escribiendo un wrapper para Harbour?. Por cierto, ¿sigues en activo?. Tu web ha desaparecido, espero que estés bien.
Comparativa de diseñadores de reportes
Sigo activo gracias a dios <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) --> mi web es <!-- m --><a class="postlink" href="http://www.gestool.es">http://www.gestool.es</a><!-- m --> Sigo trabajando en FW aunque tb en otros lenguajes para el tema de la web. Gracias por tu interés.
Comparativa de diseñadores de reportes
Genial <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->. ¿Y a qué gente te refieres, no es cuestión de trabajar el doble jaja?.
Comparativa de diseñadores de reportes
Manuel, Madre de Dios, ¡ qué página tan bonita ! Muchas felicidades. Que se note el buen desempeño. Por cierto una preguntita, ¿ el modelo de facturae que haceis es el relacionado con el hilo que habita por este foro ? Saludos
Comparativa de diseñadores de reportes
Gracias, me alegro q te guste. Si es el q deje en el foro. Saludos.
Comparativa de diseñadores de reportes
Buenos Días a todos, me gustaría hacer algunos comentarios acerca del tip. Sinceramente, creo que todo lo que hemos hecho con la herramienta FastReport, lo podríamos haber hecho con tReport + tPrinter. Cuando adquirímos FastReport, hicimos una clase, que al final, lo que hace es enviar los datos a FastReport (ya sea un array con datos o DBF e incluso sentencias SQL), variables y punto. Un informe no deja de ser eso. No he tenido que preocuparme nunca en la impresora (si era de tinta o laser), porque el informe era el mismo y se imprimia exactamente igual. Por otro lado, en alguna ocasion, me ha venido muy bien el poder usar PascalScript dentro del informe para "programar" algo dentro del informe, el tema de las imagenes tambien puedo usarlo bien. El tema de poder usar subinformes, tambien nos ha venido muy bien. Creo que el exito para nosotros era que FastReport nos hacia facil cosas triviales que con las herramientas tReport + tPrinter teníamos que programarlas, por ejemplo, recuerdo hace tiempo tener que programar el justificado normal por que un cliente se empeñó en que las lineas de sus facturas tenían que salir así. Tambien me he encontrado con algún error en FastReport. Sobre todo cuando hemos usado arrays en FastReport. Las exportaciones, tambien me han dado algun problemilla que otro, por ejemplo en PDF, tienes que embeber las fuentes, porque sino corres el peligro de que al usuario que le envies el PDF no pueda ver la fuentes (tambien creo que es solucionable). A excel tambien he tenido algun problema que otro. Resumiendo y para no aburrir al personal, FastReport me ha facilitado la creación de informes, pero como ya se ha comentado antes, el hecho de que su creador ya no esté con nosotros, nos genera un problema para futuras versiones de [x]habour e incluso de sistemas operativos. Yo no se si en las siguientes versiones de windows va a correr bien la dll, o si en siguientes versiones de [x]Harbour va a haber algun tipo de incompatibilidades con el PRG que nos suministraron. Por supuesto que todo lo que sea de la mano de Fivetech, mejor, a mi, particularmente, prefiero que esté todo unificado y este paso que ha dado Antonio, creo que puede llegar a muy buen puerto. Espero haber aportado algo con mis comentarios. Un saludo. P.D. Antonio, estoy intentando probarlo y se me queda colgado. He cogido el PRG y el CH y lo he puesto en el samples de FWH1204. ¿Hay algun problema con la versión?
Comparativa de diseñadores de reportes
<!-- l --><a class="postlink-local" href="http://fivetechsupport.com/forums/viewtopic.php?f=6&t=26747&start=45#p148205">viewtopic.php?f=6&t=26747&start=45#p148205</a><!-- l -->
Comparativa de diseñadores de reportes
Mike, Me alegro de tener algo de apoyo en la idea <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> De hecho tengo una versión más reciente, pienso que es una buena idea, y que solo suma, no resta nada <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> El diseñador de ribbonbars lo escribí en el aeropuerto cuando regresaba de visitar a Otto. Lo terminé en el avión <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Esta es una idea que puede que funcione ó no, pero lo bueno es que podemos valorarla rapidamente, y no nos hará perder mucho tiempo en caso de que no vaya a usarla nadie. Me gustan las ideas sencillas, esas que son tan simples que son obvias, y me gusta tener el 100% del control del código que programo. Nunca me han gustado las cajas cerradas, por eso construí FiveWin (cuando todos se iban como locos a VB) y por eso entendí que necesitabamos Harbour... <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Comparativa de diseñadores de reportes
Antonio, tienes el ultimo FIVEREP.PRG ? para hacer pruebas? y también su archivo fiverep.RC saludos..
Comparativa de diseñadores de reportes
Hola a todos Quiero manifestar mi apoyo a Antonino e invitarlos a que lo rodeemos en apoyo ha desarrollar una herramienta potente como dicen los usuarios de FR y propia de FW, esto lo hará ver como un sistema mas estrructurado
Comparativa de diseñadores de reportes
Hola a Todos. Creo que al igual que muchos que hemos usado FastReport, he sacado mucho de ello. Para enumerar: -Control de ancho de linea ajustable (strech) -Manejo de margenes -Etiquetas, codigos de barra -Exportacion a multiples formatos de archivos -Diseño de graficos, lineas y formas. Igual me preocupa que Sergey ya no este, ya que se compromete el uso de esta para el futuro. Vale mencionar que la casa de FastReport, tiene desarrollo para .net, VCL (delphi), Script, Linux y MacOS. Creo que el dar continuidad a FasReport for xHarbour y Harbour (Aunque nunca lo he usado) seria lo indicado. Ya la rueda esta ahi, han sido años de desarrollo en un producto, y aplicar un modelo y filosofia de exito es menos arriesgado a disparar a la oscuridad. En lo personal a mi no me importaria, pagar una licencia por FWH y otra por el generador de reportes (como un producto por separado).
Comparativa de diseñadores de reportes
Permitan unas lineas para defender la idea de Antonio: Depender de terceras personas siempre es desaconsejable en programación, aunque muchas veces no te queda mas remedio. Prueba de ello lo tengo con mi Crystal Reports que de tantos apuros me ha sacado. Con ello quiero decir que todos estos programas igual que el Fastreports nos muestran el camino a seguir. El FW tiene la potencia y la sabiduría suficiente para hacer lo que estos programas hacen y no creo que nadie lo ponga en duda. En nuestra comunidad tenemos gente que ha intentado cosas similares como hemos visto, y que al final no avanzan por no ser proyectos públicos o integrados en el FW. Lo bueno de ser proyectos de FW o públicos es que cuentan con el apoyo de todos y siempre funciona la idea++, o sea, que ante aportaciones de otros usuarios se van añadiendo nuevas funcionalidades que al final crean una utilidad bastante potente. Esta es la idea que tenemos siempre que defender, que se parte como dice Antonio de ideas SIMPLES para que todos tengamos la posibilidad de ir viendo como crece y saber como funciona y sobre todo el resultado que nos de sea siempre de lo mas sencillo. Al fin y al cabo, el problema que todos tenemos es la falta de tiempo para dedicarnos a desarrollos que desearíamos ya tener. Pero bueno, yo empleo muchísimas cosas de FW que sencillamente empezaron como pequeñas ideas de desarrollo pero sin las cuales ahora no puedo seguir. Por lo tanto, defiendo a ultranza cualquier cosa que me pueda servir para desarrollos futuros por muy básicas que sean. Una de las cosas que más he empleado en el Crystall Reports, es la tabla de referencia cruzada. Pones un campo en una columna y otro campo en otra y le dices el tipo de resultado que quieres (recuento, suma...). Te realiza simplemente una tabla con el resultado. Para mí este sistema cubre un 80% de mis reportes y el resto los hago con tReport/tPrint sin problemas ya que son simples listados. Antonio, crees que una tabla de referencia cruzada se podría emplear en este nuevo diseñador de reportes que propones?
Comparativa de diseñadores de reportes
Andrés, Puedes mostrar alguna imagen de como lo diseñas y como se muestra ? gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Comparativa de diseñadores de reportes
César, En cuanto terminemos unas mejoras del preview (soporte de visualización de mini páginas a la izquierda) publicaré aqui lo más reciente de FiveReps.prg <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Comparativa de diseñadores de reportes
Hola, fastreport es una muy buena herramienta, pero doy un ejemplo, los codigos de barras han evolucionado, y este se quedo con los antiguas barras, ya que ahora se utilizan datamatrix, pdf417 y este no los contiene, el nuevo diseñador debiera considerar los nuevos codigos de barra... es mi humilde aporte
Comparativa de diseñadores de reportes
Hola a Todos Recien acabo de leer, que los chicos de la competencia no anduvieron con muchos rodeos, y se tomaron el toro por los cuernos, con Fast Report, dandole continuacion a lo de Sergei, como socios de la compañia rusa que desarrolla FastReport. Es bueno desarrollar algo nuevo, pero sin descuidar los frentes, debemos estar preparados para todo, con multiples opciones, Estoy con FiveWin desde el 2004, y pase TODOS mis reportes en el 2010 a FastReport, y el estar sin soporte ante las nuevas versiones de FastReport es frustrante, como buen producto que es.
Comparativa de diseñadores de reportes
Antonio, The Vrd MyRep of Charles is a good product Only the customers could not understand the inspector column if they want change a report ( final user) I propose to Charles to make a version with dialog and I show how I thinked how the dialogs must be But Charles sad me it was no possible because all Know inspector class. this the editor I saw on Italian Application [img:2gqwngo3]http&#58;//www&#46;danea&#46;it/software/easyfatt/sch/editor&#46;gif[/img:2gqwngo3] and here a small video how change a document from an application ( I think it can be made also with fwh) <!-- m --><a class="postlink" href="http://www.danea.it/software/easyfatt/filmati/2006/report.htm">http://www.danea.it/software/easyfatt/f ... report.htm</a><!-- m -->
Comparativa de diseñadores de reportes
Silvio , Te pregunto , este proyecto es que que esta al instalar FWH una carpeta que se llama MyRpt Saludos
Comparativa de diseñadores de reportes
Rubén, Sí, es correcto. Lo hizo Carles.
Comparazione font di FWH e font di Windows (Word per esempio
Salve a tutti,ho la necessità di calcolare le dimensioni giuste del font necessario per stampare un certo numero di caratteri.Ho quindi fatto questa routine alla quale passo come parametri:- cFontName, ossia il font che voglio utilizzare, per esempio "Arial"- n_ColRequiredil numero di caratteri che voglio siano rappresentati in una linea di stampa- nMaxSize, ossia le dimensioni del foglio in millimetriSembra funzioni, però mi restituisce una dimensione di font diversa da quella che utilizzerei ad esempio in Word mentre ho la necessità di ottenere un valore comparabile con Word/Windows.Qualche idea ?Grazie.? GetFontSize("Arial",136,"210")Function GetFontSize(cFontName,n_ColRequired,nMaxSize) oPrn:=PrintBegin("") aPoints:=oPrn:Cmtr2Pix(0,nMaxSize/10) for nFontWidth:=90 to 1 step -1 oFont:=Tfont():New(cFontName,-nFontWidth) oPrn:SetFont(oFont) llv:=oPrn:GetTextWidth(replicate("B",n_ColRequired),oFont) llv2:=oPrn:Pix2mmtr(0,llv) if llv2[2]<nMaxSize && exit endif oFont:End() sysrefresh() next oPrn:End() return(nFontWidth)
Compare 2 DBF files
Dear FWH friends, I have question about 2 DBFs compare. Cust.DBF data below NO NAME 01 ABC 02 Taipei 03 Taiwan 04 NCC 05 CNN Bill.DBF data below NO NAME 01 ABC 02 Taipei So I want to delete Cust.DBF data same as Bill.DBF data(NO) I want this below Cust.DBF data below NO NAME 03 Taiwan 04 NCC 05 CNN These are my code below: Cust.DBF->(::cDBx) Index on NO Tag Temp1 Bill.DBF->(::cDB2x) Index on NO Tag Temp2 [code=fw:2w58qnys]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">SELECT</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cDBx</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cDBx</span><span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>!EOF<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;cCUST_NOx &nbsp;:= <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cDBx</span><span style="color: #000000;">&#41;</span>->CUST_NO<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">SELECT</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cDB2x</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;SET ORDER <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Temp2"</span><br />&nbsp; &nbsp;<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cDB2x</span><span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> DbGoTop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;SET SoftSeek OFF<br />&nbsp; &nbsp;Dr_DbSeek<span style="color: #000000;">&#40;</span> cCUST_NOx, <span style="color: #ff0000;">"Temp2"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> !EOF<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> .AND. !Empty<span style="color: #000000;">&#40;</span>cCUST_NOx<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cDB2x</span><span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> DbRLock<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cDB2x</span><span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> DbDelete<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cDB2x</span><span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> DbUnLock<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;SET SoftSeek <span style="color: #0000ff;">ON</span><br />&nbsp; <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cDBx</span><span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> DbSkip<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cCUST_NOx := <span style="color: #ff0000;">""</span><br /><span style="color: #00C800;">ENDDO</span><br />&nbsp;</div>[/code:2w58qnys] But I can’t delete Cust.DBF(::cDBx) data Any suggestion for it? Thanks a lot.
Compare 2 DBF files
Richard, Hmm. I have questions. Are there two fields named CUSTNO and NO in both the cust and bill file? If so, is the CUSTNO relevant in some way, or do you just want to delete all the data in the NO field from Cust file for any NO data that exists in the Bill file? I am assuming that the "01" "02" "03" is that actual data that is contained in the NO field? So if there is a "01" in the NO field of bill file, you just want to delete all occurrences of "01" in the customer file? Also, I would like to make a suggestion. I'm sure you have heard it before, but, using database objects makes your code SO much easier to read and understand, and the code is usually much shorter. You never have to worry about workareas, alias references, etc., etc., etc... James
Compare 2 DBF files
[quote="James Bott":33fuo12c]Richard, Hmm. I have questions. Are there two fields named CUSTNO and NO in both the cust and bill file? If so, is the CUSTNO relevant in some way, or do you just want to delete all the data in the NO field from Cust file for any NO data that exists in the Bill file? I am assuming that the "01" "02" "03" is that actual data that is contained in the NO field? So if there is a "01" in the NO field of bill file, you just want to delete all occurrences of "01" in the customer file? Also, I would like to make a suggestion. I'm sure you have heard it before, but, using database objects makes your code SO much easier to read and understand, and the code is usually much shorter. You never have to worry about workareas, alias references, etc., etc., etc... James[/quote:33fuo12c] Dear James, Are there two fields named CUSTNO and NO in both the cust and bill file? =>Yes do you just want to delete all the data in the NO field from Cust file for any NO data that exists in the Bill file? =>Yes So if there is a "01" in the NO field of bill file, you just want to delete all occurrences of "01" in the customer file? =>Yes sorry,my mistake. NO = CUST_NO I test it and no delete in CUST.dbf
Compare 2 DBF files
Richard, OK, try the code below. I have taken a different approach; use a unique index to get a list of each of the CUST_NOs in bill.dbf, then delete all those CUST_NOs in cust.dbf. I have not tested this code. Test it on some copies of your dbf files. James [code=fw:sppx5tau]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   use cust exclusive<br />   <span style="color: #0000ff;">index</span> <span style="color: #0000ff;">on</span> CUST_NO <span style="color: #0000ff;">to</span> temp1<br /><br />   <span style="color: #B900B9;">// Create index of unique cust_no's</span><br />   use bill exclusive <span style="color: #00C800;">new</span><br />   <span style="color: #0000ff;">index</span> <span style="color: #0000ff;">on</span> CUST_NO <span style="color: #0000ff;">to</span> temp2 unique<br /><br />   <span style="color: #B900B9;">// Delete all CUST_NO's in Cust file that</span><br />   <span style="color: #B900B9;">// exist in Bill file.</span><br />   <span style="color: #0000ff;">select</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"bill"</span><span style="color: #000000;">&#41;</span><br />   go top<br />   <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> ! bill-><span style="color: #000000;">&#40;</span>eof<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />      cCUST_NO:= bill->CUST_NO<br />      <span style="color: #0000ff;">select</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"cust"</span><span style="color: #000000;">&#41;</span><br />      seek<span style="color: #000000;">&#40;</span>cCUST_NO<span style="color: #000000;">&#41;</span><br />      delete <span style="color: #00C800;">while</span> CUST_NO == cCUST_NO<br />      <span style="color: #0000ff;">select</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"bill"</span><span style="color: #000000;">&#41;</span><br />      skip<br />   <span style="color: #00C800;">enddo</span><br /><br />   ferase<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"temp1.ntx"</span><span style="color: #000000;">&#41;</span><br />   ferase<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"temp2.ntx"</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:sppx5tau]
Compare 2 DBF files
because customer and bill is a copy, only 1 record is deleted in CUSTOMER.dbf in my sample. I added numbers in sample dbf CUSTOMER. In browser BILL ( empty numbers ), You can add a number and test the RELATION to CUSTOMER. I used a RELATION, to delete ALL records in a DO WHILE with the number defined in BILL.dbf Just add the missing number in BILL.dbf and it will skip to the record with the number in CUSTOMER.dbf. Select button < COMPARE DBF > and CUSTOMER will be cleaned from the number. [img:2l16ukgx]http&#58;//www&#46;pflegeplus&#46;com/pictures/compare1&#46;jpg[/img:2l16ukgx] is this a possible solution ? I can add a download-link for the sample. [code=fw:2l16ukgx]<div class="fw" id="{CB}" style="font-family: monospace;"><br />DBSELECTAREA<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />NET_USE <span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CUST.dbf"</span>, <span style="color: #000000;">3</span>, <span style="color: #000000;">3</span>, .T. <span style="color: #000000;">&#41;</span> <br /><span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->CUST_NO <span style="color: #0000ff;">TO</span> CUST1<br /><br />DBSELECTAREA<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />NET_USE <span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"BILL.dbf"</span>, <span style="color: #000000;">3</span>, <span style="color: #000000;">3</span>, .T. <span style="color: #000000;">&#41;</span> <br /><span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>->CUST_NO <span style="color: #0000ff;">TO</span> BILL1<br /><br />dbSETRELATION<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> , <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>->CUST_NO<span style="color: #000000;">&#125;</span>, <span style="color: #ff0000;">"(2)->CUST_NO"</span> <span style="color: #000000;">&#41;</span><br />...<br />...<br /><br /><span style="color: #B900B9;">// -------------- Delete ALL numbers ----------</span><br /><br /><span style="color: #00C800;">FUNCTION</span> COMP_DBF1<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><span style="color: #00C800;">LOCAL</span> nNumber<br /><br />DBSELECTAREA<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><br />DBGOTOP<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> !EOF<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    nNumber := <span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>->CUST_NO<br />    <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">&#40;</span> nNumber <span style="color: #000000;">&#41;</span><br />        <span style="color: #B900B9;">// MsgAlert( (2)->CUST_NO, "Bill" )</span><br />        DBSELECTAREA<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// RELATION to BILL.dbf with CUST_NO</span><br />        <span style="color: #B900B9;">// MsgAlert( (1)->CUST_NO, "Customer" )</span><br />            <span style="color: #00C800;">IF</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->CUST_NO = nNumber<br />            <span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->CUST_NO = nNumber<br />                NET_DELETE <span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>    <br />                DBSKIP<span style="color: #000000;">&#40;</span><span style="color: #000000;">+1</span><span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">ENDDO</span><br />        <span style="color: #00C800;">ENDIF</span><br />    <span style="color: #00C800;">ENDIF</span><br />    DBSELECTAREA<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><br />    DBSKIP<span style="color: #000000;">&#40;</span><span style="color: #000000;">+1</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDDO</span><br />DBSELECTAREA<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> <br />NET_PACK<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CUST.dbf"</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// ----------- Delete SINGLE Number --------</span><br /><br /><span style="color: #00C800;">FUNCTION</span> COMP_DBF2<span style="color: #000000;">&#40;</span>number<span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// deletes ALL < CUST_NO > selected in BILL.dbf</span><br /><br />DBSELECTAREA<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// RELATION to BILL.dbf with CUST_NO</span><br /><span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->CUST_NO = number<br />    NET_DELETE <span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// trials  </span><br />    DBSKIP<span style="color: #000000;">&#40;</span><span style="color: #000000;">+1</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDDO</span><br />NET_PACK<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CUST.dbf"</span>, <span style="color: #000000;">3</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// trials</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:2l16ukgx] Best regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
Compare 2 DBF files
I just tested my sample code in my previous message and it worked perfectly for me. I did make a couple of minor changes to the code, but the above sample works. James [code=fw:95gcsuau]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// Author: James Bott</span><br /><span style="color: #B900B9;">// Date   : 1/29/2014 </span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   use cust exclusive<br />   recall all <span style="color: #B900B9;">// undelete all for testing</span><br />   <span style="color: #0000ff;">index</span> <span style="color: #0000ff;">on</span> CUST_NO <span style="color: #0000ff;">to</span> temp1<br /><br />   <span style="color: #B900B9;">// Create index of unique cust_no's</span><br />   use bill exclusive <span style="color: #00C800;">new</span><br />   <span style="color: #0000ff;">index</span> <span style="color: #0000ff;">on</span> CUST_NO <span style="color: #0000ff;">to</span> temp2 unique<br /><br />   <span style="color: #B900B9;">// Delete all CUST_NO's in Cust file that</span><br />   <span style="color: #B900B9;">// exist in Bill file.</span><br />   <span style="color: #0000ff;">select</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"bill"</span><span style="color: #000000;">&#41;</span><br />   go top<br />   <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> ! bill-><span style="color: #000000;">&#40;</span>eof<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />      cCUST_NO:= bill->CUST_NO<br />      <span style="color: #0000ff;">select</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"cust"</span><span style="color: #000000;">&#41;</span><br />      seek<span style="color: #000000;">&#40;</span>cCUST_NO<span style="color: #000000;">&#41;</span><br />      delete <span style="color: #00C800;">while</span> CUST_NO == cCUST_NO<br />      <span style="color: #0000ff;">select</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"bill"</span><span style="color: #000000;">&#41;</span><br />      skip<br />   <span style="color: #00C800;">enddo</span><br />   <span style="color: #0000ff;">select</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"cust"</span><span style="color: #000000;">&#41;</span><br />   use<br />   <span style="color: #0000ff;">select</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"bill"</span><span style="color: #000000;">&#41;</span><br />   use<br />   ferase<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"temp1.ntx"</span><span style="color: #000000;">&#41;</span><br />   ferase<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"temp2.ntx"</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:95gcsuau]
Compare 2 DBF files
[quote="James Bott":2z0x9ybe]I just tested my sample code in my previous message and it worked perfectly for me. I did make a couple of minor changes to the code, but the above sample works. James [code=fw:2z0x9ybe]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// Author: James Bott</span><br /><span style="color: #B900B9;">// Date   : 1/29/2014 </span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   use cust exclusive<br />   recall all <span style="color: #B900B9;">// undelete all for testing</span><br />   <span style="color: #0000ff;">index</span> <span style="color: #0000ff;">on</span> CUST_NO <span style="color: #0000ff;">to</span> temp1<br /><br />   <span style="color: #B900B9;">// Create index of unique cust_no's</span><br />   use bill exclusive <span style="color: #00C800;">new</span><br />   <span style="color: #0000ff;">index</span> <span style="color: #0000ff;">on</span> CUST_NO <span style="color: #0000ff;">to</span> temp2 unique<br /><br />   <span style="color: #B900B9;">// Delete all CUST_NO's in Cust file that</span><br />   <span style="color: #B900B9;">// exist in Bill file.</span><br />   <span style="color: #0000ff;">select</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"bill"</span><span style="color: #000000;">&#41;</span><br />   go top<br />   <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> ! bill-><span style="color: #000000;">&#40;</span>eof<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />      cCUST_NO:= bill->CUST_NO<br />      <span style="color: #0000ff;">select</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"cust"</span><span style="color: #000000;">&#41;</span><br />      seek<span style="color: #000000;">&#40;</span>cCUST_NO<span style="color: #000000;">&#41;</span><br />      delete <span style="color: #00C800;">while</span> CUST_NO == cCUST_NO<br />      <span style="color: #0000ff;">select</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"bill"</span><span style="color: #000000;">&#41;</span><br />      skip<br />   <span style="color: #00C800;">enddo</span><br />   <span style="color: #0000ff;">select</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"cust"</span><span style="color: #000000;">&#41;</span><br />   use<br />   <span style="color: #0000ff;">select</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"bill"</span><span style="color: #000000;">&#41;</span><br />   use<br />   ferase<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"temp1.ntx"</span><span style="color: #000000;">&#41;</span><br />   ferase<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"temp2.ntx"</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:2z0x9ybe][/quote:2z0x9ybe] Dear James, It's work perfect!! Thanks a lot.
Compare 2 DBF files
[quote="ukoenig":2w4r7t5b]because customer and bill is a copy, only 1 record is deleted in CUSTOMER.dbf in my sample. I added numbers in sample dbf CUSTOMER. In browser BILL ( empty numbers ), You can add a number and test the RELATION to CUSTOMER. I used a RELATION, to delete ALL records in a DO WHILE with the number defined in BILL.dbf Just add the missing number in BILL.dbf and it will skip to the record with the number in CUSTOMER.dbf. Select button < COMPARE DBF > and CUSTOMER will be cleaned from the number. [img:2w4r7t5b]http&#58;//www&#46;pflegeplus&#46;com/pictures/compare1&#46;jpg[/img:2w4r7t5b] is the a possible solution ? I can add a download-link for the sample. [code=fw:2w4r7t5b]<div class="fw" id="{CB}" style="font-family: monospace;"><br />DBSELECTAREA<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />NET_USE <span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CUST.dbf"</span>, <span style="color: #000000;">3</span>, <span style="color: #000000;">3</span>, .T. <span style="color: #000000;">&#41;</span> <br /><span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->CUST_NO <span style="color: #0000ff;">TO</span> CUST1<br /><br />DBSELECTAREA<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />NET_USE <span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"BILL.dbf"</span>, <span style="color: #000000;">3</span>, <span style="color: #000000;">3</span>, .T. <span style="color: #000000;">&#41;</span> <br /><span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>->CUST_NO <span style="color: #0000ff;">TO</span> BILL1<br /><br />dbSETRELATION<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> , <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>->CUST_NO<span style="color: #000000;">&#125;</span>, <span style="color: #ff0000;">"(2)->CUST_NO"</span> <span style="color: #000000;">&#41;</span><br />...<br />...<br /><br /><span style="color: #B900B9;">// -------------- Delete ALL numbers ----------</span><br /><br /><span style="color: #00C800;">FUNCTION</span> COMP_DBF1<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><span style="color: #00C800;">LOCAL</span> nNumber<br /><br />DBSELECTAREA<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><br />DBGOTOP<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> !EOF<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    nNumber := <span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>->CUST_NO<br />    <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">&#40;</span> nNumber <span style="color: #000000;">&#41;</span><br />        <span style="color: #B900B9;">// MsgAlert( (2)->CUST_NO, "Bill" )</span><br />        DBSELECTAREA<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// RELATION to BILL.dbf with CUST_NO</span><br />        <span style="color: #B900B9;">// MsgAlert( (1)->CUST_NO, "Customer" )</span><br />            <span style="color: #00C800;">IF</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->CUST_NO = nNumber<br />            <span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->CUST_NO = nNumber<br />                NET_DELETE <span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>    <br />                DBSKIP<span style="color: #000000;">&#40;</span><span style="color: #000000;">+1</span><span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">ENDDO</span><br />        <span style="color: #00C800;">ENDIF</span><br />    <span style="color: #00C800;">ENDIF</span><br />    DBSELECTAREA<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><br />    DBSKIP<span style="color: #000000;">&#40;</span><span style="color: #000000;">+1</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDDO</span><br />DBSELECTAREA<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> <br />NET_PACK<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CUST.dbf"</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// ----------- Delete SINGLE Number --------</span><br /><br /><span style="color: #00C800;">FUNCTION</span> COMP_DBF2<span style="color: #000000;">&#40;</span>number<span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// deletes ALL < CUST_NO > selected in BILL.dbf</span><br /><br />DBSELECTAREA<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// RELATION to BILL.dbf with CUST_NO</span><br /><span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>->CUST_NO = number<br />    NET_DELETE <span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// trials  </span><br />    DBSKIP<span style="color: #000000;">&#40;</span><span style="color: #000000;">+1</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDDO</span><br />NET_PACK<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CUST.dbf"</span>, <span style="color: #000000;">3</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// trials</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:2w4r7t5b] Best regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->[/quote:2w4r7t5b] Dear Uwe, Welcome share your idea sample link file. Thanks a lot.
Compare 2 DBF files
Richard, Like You can see, some more things are added to the test. ( I Still have to test using MULTIPLE index ) I added two RELATION-options // Set a relation from BILL into CUST [color=#008000:3qkt6hr5][b:3qkt6hr5]DBSETRELATION("CUST", {|| ("BILL")->CUST_NO}, '("BILL")->CUST_NO')[/b:3qkt6hr5][/color:3qkt6hr5] and // Set a [color=#FF0000:3qkt6hr5]selective[/color:3qkt6hr5] relation from BILL into CUST [color=#0000FF:3qkt6hr5][size=150:3qkt6hr5]ORDSETRELATION("CUST", {|| ("BILL")->CUST_NO}, '("BILL")->CUST_NO')[/size:3qkt6hr5][/color:3qkt6hr5] The normal preview with NO relation selected ( all records ) : [img:3qkt6hr5]http&#58;//www&#46;pflegeplus&#46;com/pictures/Order1&#46;jpg[/img:3qkt6hr5] Activated relation. Browser CUSTOMER shows the POSITION of a selected CUST_NO. NO seek needed : [img:3qkt6hr5]http&#58;//www&#46;pflegeplus&#46;com/pictures/Order2&#46;jpg[/img:3qkt6hr5] Browser CUSTOMER shows only a selected CUST_NO like a [color=#FF0000:3qkt6hr5]FILTER[/color:3qkt6hr5]. NO seek needed : [img:3qkt6hr5]http&#58;//www&#46;pflegeplus&#46;com/pictures/Order3&#46;jpg[/img:3qkt6hr5]
Compare 2 DBF files
[quote="ukoenig":2q9zlair]Richard, Like You can see, some more things are added to the test. ( I Still have to test using MULTIPLE index ) I added two RELATION-options // Set a relation from BILL into CUST [color=#008000:2q9zlair][b:2q9zlair]DBSETRELATION("CUST", {|| ("BILL")->CUST_NO}, '("BILL")->CUST_NO')[/b:2q9zlair][/color:2q9zlair] and // Set a [color=#FF0000:2q9zlair]selective[/color:2q9zlair] relation from BILL into CUST [color=#0000FF:2q9zlair][size=150:2q9zlair]ORDSETRELATION("CUST", {|| ("BILL")->CUST_NO}, '("BILL")->CUST_NO')[/size:2q9zlair][/color:2q9zlair] The normal preview with NO relation selected ( all records ) : [img:2q9zlair]http&#58;//www&#46;pflegeplus&#46;com/pictures/Order1&#46;jpg[/img:2q9zlair] Activated relation. Browser CUSTOMER shows the POSITION of a selected CUST_NO. NO seek needed : [img:2q9zlair]http&#58;//www&#46;pflegeplus&#46;com/pictures/Order2&#46;jpg[/img:2q9zlair] Browser CUSTOMER shows only a selected CUST_NO like a [color=#FF0000:2q9zlair]FILTER[/color:2q9zlair]. NO seek needed : [img:2q9zlair]http&#58;//www&#46;pflegeplus&#46;com/pictures/Order3&#46;jpg[/img:2q9zlair][/quote:2q9zlair] Dear Uwe, Nice job.
Compare 2 DBF files
Richard completed : <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=28048">viewtopic.php?f=3&t=28048</a><!-- l --> best regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Compare 2 DBF files
Richard, I do wonder why you had this situation in the first place. Hopefully, this was a one time issue. Ideally, the data entry system should never allow data to be entered that causes this kind of problem. If this is a regular problem, then maybe we could offer some suggestions to prevent it from happening. James
Compare Two dates
I have Two dates as strings (on a array) Ddcheck_in and ddcheck_out And Two dates on variables oApp(): datainiziale oApp():datafinale I made If dtos(oApp() datainiziale)=dtos(ddcheck_in) .and. dtos(oApp():datafinale) = dtos(ddcheck_out) lDaily=.t. Endif Why not run ok?
Compare Two dates
If dtos(oApp()[b:3eze3xvk][color=#FF0040:3eze3xvk]:[/color:3eze3xvk][/b:3eze3xvk]datainiziale)=dtos(ddcheck_in) .and. dtos(oApp():datafinale) = dtos(ddcheck_out) lDaily=.t. Endif
Compare Two dates
Wich Is changed Marco
Compare structure of DBF on 2 locations
Hello, In order to upgrade my program I want to be able to check the structure of dbf's on 2 locations. While upgrading, I change structures now and then, but I would be handy if I could run a routine that will give the differences from each file (same name), but sometimes different structures. Anybody that has this routine already made ? It is not needed to update the structures or so... only show the difference.
Compare structure of DBF on 2 locations
You can use this to compare structures of two dbfs and know if they are same or not. For this purpose, you need not even open (with USE) the dbfs. [code=fw:2tesnn2l]<div class="fw" id="{CB}" style="font-family: monospace;"><br />aStruct1 := FW_DBFSTRUCT<span style="color: #000000;">&#40;</span> <firstdbfwithfullpath> <span style="color: #000000;">&#41;</span><br />aStruct2 := FW_DBFSTRUCT<span style="color: #000000;">&#40;</span> <seconddbfwithfullpath> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">if</span> FW_ArrayAsList<span style="color: #000000;">&#40;</span> aStruct1 <span style="color: #000000;">&#41;</span> == FW_ArrayAsList<span style="color: #000000;">&#40;</span> aStruct2 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// Same structure</span><br /><span style="color: #00C800;">else</span><br />&nbsp; <span style="color: #B900B9;">// different</span><br />&nbsp; <your routine <span style="color: #0000ff;">to</span> compare aStruct1 with aStruct2><br /><span style="color: #00C800;">endif</span><br />&nbsp;</div>[/code:2tesnn2l]
Compare structure of DBF on 2 locations
[code=fw:2xniwnq7]<div class="fw" id="{CB}" style="font-family: monospace;">aStruct1 := FW_DBFSTRUCT<span style="color: #000000;">&#40;</span> <firstdbfwithfullpath> <span style="color: #000000;">&#41;</span><br />aStruct2 := FW_DBFSTRUCT<span style="color: #000000;">&#40;</span> <seconddbfwithfullpath> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// Add this, please</span><br />aStruct1:= aSort<span style="color: #000000;">&#40;</span>aStruct1, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #000000;">&#123;</span>|x, y| x<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> < y<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />aStruct2:= aSort<span style="color: #000000;">&#40;</span>aStruct2, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #000000;">&#123;</span>|x, y| x<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> < y<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">if</span> FW_ArrayAsList<span style="color: #000000;">&#40;</span> aStruct1 <span style="color: #000000;">&#41;</span> == FW_ArrayAsList<span style="color: #000000;">&#40;</span> aStruct2 <span style="color: #000000;">&#41;</span><br />   <span style="color: #B900B9;">// Same structure</span><br /><span style="color: #00C800;">else</span><br />  <span style="color: #B900B9;">// different</span><br />  <your routine <span style="color: #0000ff;">to</span> compare aStruct1 with aStruct2><br /><span style="color: #00C800;">endif</span></div>[/code:2xniwnq7]
Compare structure of DBF on 2 locations
[quote="nageswaragunupudi":33g826zk]You can use this to compare structures of two dbfs and know if they are same or not. For this purpose, you need not even open (with USE) the dbfs. [code=fw:33g826zk]<div class="fw" id="{CB}" style="font-family: monospace;"><br />aStruct1 := FW_DBFSTRUCT<span style="color: #000000;">&#40;</span> <firstdbfwithfullpath> <span style="color: #000000;">&#41;</span><br />aStruct2 := FW_DBFSTRUCT<span style="color: #000000;">&#40;</span> <seconddbfwithfullpath> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">if</span> FW_ArrayAsList<span style="color: #000000;">&#40;</span> aStruct1 <span style="color: #000000;">&#41;</span> == FW_ArrayAsList<span style="color: #000000;">&#40;</span> aStruct2 <span style="color: #000000;">&#41;</span><br />   <span style="color: #B900B9;">// Same structure</span><br /><span style="color: #00C800;">else</span><br />  <span style="color: #B900B9;">// different</span><br />  <your routine <span style="color: #0000ff;">to</span> compare aStruct1 with aStruct2><br /><span style="color: #00C800;">endif</span><br /> </div>[/code:33g826zk][/quote:33g826zk] Hi Mr. Rao, Is this valid for MariaDB? Also, Can you forward me to write //different part for MariaDB?
Compare structure of DBF on 2 locations
This code is only for DBF files. [quote:8l6hla9g]Can you forward me to write //different part for MariaDB? [/quote:8l6hla9g] I do not understand your question. Can you please clarify?
Compare structure of DBF on 2 locations
Can XBrowser show 2 array of data at one time ? Xbrowser(aData1,adata2) // See the names (even the structure of the 2 arrays next to each other) I have seen great stuff with just 1 or 2 lines with Xbrowser <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Maybe combine the Arrays to 1 bigger and show this with Xbrowser It is only for viewing, no changes are to be made.
Compare structure of DBF on 2 locations
[quote="nageswaragunupudi":oyn2j8dt]This code is only for DBF files. [quote:oyn2j8dt]Can you forward me to write //different part for MariaDB? [/quote:oyn2j8dt] I do not understand your question. Can you please clarify?[/quote:oyn2j8dt] I mean How to change structure in MariaDB with data? Thanks.
Compare structure of DBF on 2 locations
oCn:RenameColumn( cTable, cOldName, cNewName ) oCn:AddColumn( cTable, aColSpec ) oCn:AlterColumn( cTable, aColSpec ) aColSpec ( dbf column spec ) Eg: { "firstname", "C", 30, 0 } { "salary", "N", 10, 2 } etc
Compare structure of DBF on 2 locations
Hi Mr. Rao, 1) Is there any method to delete Column? [code=fw:3cn6d4vg]<div class="fw" id="{CB}" style="font-family: monospace;">oCn:<span style="color: #000000;">AddColumn</span><span style="color: #000000;">&#40;</span> cTable, aColSpec <span style="color: #000000;">&#41;</span><br />oCn:<span style="color: #000000;">AlterColumn</span><span style="color: #000000;">&#40;</span> cTable, aColSpec <span style="color: #000000;">&#41;</span></div>[/code:3cn6d4vg]2) Has aColSpec more than one field? for example {{"name", "C", 100,0}, {"telefon","C",20,0} 3) Is AlterColumn means can change type, len, dec for a specified fieldname?
Compare structure of DBF on 2 locations
[quote:3ix91zik] 1) Is there any method to delete Column? [/quote:3ix91zik] No. [quote:3ix91zik] 2) Has aColSpec more than one field? for example {{"name", "C", 100,0}, {"telefon","C",20,0} [/quote:3ix91zik] Only one column. [quote:3ix91zik] 3) Is AlterColumn means can change type, len, dec for a specified fieldname? [/quote:3ix91zik] Yes.
Compare structure of DBF on 2 locations
Hi Mr. Rao, I try to write Alter_Table function according to my knowledge. This function compares cTableName's structure and given new structure and it decided to which colspec is added, changed or deleted. There is not problem adding or deleting for aColSpec. But When I changing in Numeric variables type and length is not mine that is described my aNew_Structure. It behaves it like in CreateTable function. for example, my Numeric, 5 converted to INT, 11. This function always think this variable's spec is changed and start to run AlterTable(). How Can I solve this problem. Is there any function to convert this behavior? [code=fw:1ntsxlo8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />    ...<br />    ...             <br />    lUpdate_Yap := Alter_Table<span style="color: #000000;">&#40;</span>oCn, cTableName, aNew_Structure<span style="color: #000000;">&#41;</span><br />    ...<br />    ...<br /><br /><br />*-----------------------------------------------------------------------------------------------<br /><span style="color: #00C800;">FUNCTION</span> Alter_Table<span style="color: #000000;">&#40;</span>oCn, cTableName, aNew, lShow<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> l, lResult := .f., aCompare_Result, cDel_SQL, cOld<br /><span style="color: #00C800;">DEFAULT</span> lShow := .F.<br /><br />    <span style="color: #00C800;">IF</span> oCn<>nil .AND. oCn:<span style="color: #000000;">TableExists</span><span style="color: #000000;">&#40;</span>cTableName<span style="color: #000000;">&#41;</span><br />        aOld := oCn:<span style="color: #000000;">TableStructure</span><span style="color: #000000;">&#40;</span>cTableName<span style="color: #000000;">&#41;</span><br />        aCompare_Result := Compare_Two_Table<span style="color: #000000;">&#40;</span>aOld, aNew<span style="color: #000000;">&#41;</span><br /><br />        <span style="color: #00C800;">if</span> lShow<br />            xbrowser aOld slnum <span style="color: #0000ff;">TITLE</span> cTableName+<span style="color: #ff0000;">" - aOld STRUCTURE"</span><br />            xbrowser aNew SLNUM <span style="color: #0000ff;">TITLE</span> cTableName+<span style="color: #ff0000;">" - aNew STRUCTURE"</span><br />            xbrowser aCompare_Result slnum<br />        <span style="color: #00C800;">ENDIF</span><br />        <br />        <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">&#40;</span>aCompare_Result<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>       <span style="color: #B900B9;">// EKLENECEK VAR</span><br />            <span style="color: #00C800;">FOR</span> l:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span>aCompare_Result<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 />                oCn:<span style="color: #000000;">AddColumn</span><span style="color: #000000;">&#40;</span> cTableName, aCompare_Result<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>l<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>                      <br />            <span style="color: #00C800;">NEXT</span><br />            lResult:=.T.<br />        <span style="color: #00C800;">ENDIF</span><br />        <br />        <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">&#40;</span>aCompare_Result<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>       <span style="color: #B900B9;">// ?ÇER??? DE???ECEK VAR</span><br />            <span style="color: #00C800;">FOR</span> l:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span>aCompare_Result<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 />                oCn:<span style="color: #000000;">AlterColumn</span><span style="color: #000000;">&#40;</span> cTableName, aCompare_Result<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>l<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">NEXT</span><br />            lResult:=.T.<br />        <span style="color: #00C800;">ENDIF</span><br />        <br />        <span style="color: #00C800;">IF</span> !EMPTY<span style="color: #000000;">&#40;</span>aCompare_Result<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>       <span style="color: #B900B9;">// S?L?NECEK VAR</span><br />            <span style="color: #00C800;">FOR</span> l:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span>aCompare_Result<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />                cDel_SQL := <span style="color: #ff0000;">"ALTER TABLE "</span>+cTableName+<span style="color: #ff0000;">" DROP COLUMN IF EXISTS "</span>+aCompare_Result<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>l,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><br />                oCn:<span style="color: #000000;">Execute</span><span style="color: #000000;">&#40;</span>cDel_SQL<span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">NEXT</span><br />            lResult:=.T.<br />        <span style="color: #00C800;">ENDIF</span><br />    <span style="color: #00C800;">ENDIF</span>   <br /><span style="color: #00C800;">RETURN</span> lResult<br />*------------------------------------------------------------------------------------------------<br /><span style="color: #00C800;">FUNCTION</span> Compare_Two_Table<span style="color: #000000;">&#40;</span>aOld, aNew<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> aInsert:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>, aChange := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>, aDelete := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>, i<br /><br />    <span style="color: #00C800;">FOR</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span>aOld<span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">IF</span> aOld<span style="color: #000000;">&#91;</span>i,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>=<span style="color: #ff0000;">"m"</span><br />            aOld<span style="color: #000000;">&#91;</span>i,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>=<span style="color: #000000;">10</span><br />        <span style="color: #00C800;">ENDIF</span><br />    <span style="color: #00C800;">NEXT</span>    <br />                <br />    <span style="color: #00C800;">FOR</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span>aNew<span style="color: #000000;">&#41;</span><br />        nAt := AScan<span style="color: #000000;">&#40;</span>aOld, <span style="color: #000000;">&#123;</span>|a|a<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>=aNew<span style="color: #000000;">&#91;</span>i,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">IF</span> nAt = <span style="color: #000000;">0</span>  <span style="color: #B900B9;">// Yani bizim table da arad???m?z yok ise yenidir.</span><br />            aAdd<span style="color: #000000;">&#40;</span>aInsert, aNew<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ELSE</span><br />            <span style="color: #00C800;">IF</span> aOld<span style="color: #000000;">&#91;</span>nAt,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><>aNew<span style="color: #000000;">&#91;</span>i,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> .OR. aOld<span style="color: #000000;">&#91;</span>nAt,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span><>aNew<span style="color: #000000;">&#91;</span>i,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> .OR. aOld<span style="color: #000000;">&#91;</span>nAt,<span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span><>aNew<span style="color: #000000;">&#91;</span>i,<span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> <br />                aAdd<span style="color: #000000;">&#40;</span>aChange, aNew<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">ENDIF</span><br />        <span style="color: #00C800;">ENDIF</span>   <br />    <span style="color: #00C800;">NEXT</span><br />    <br />    <span style="color: #00C800;">FOR</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span>aOld<span style="color: #000000;">&#41;</span><br />        nAt := AScan<span style="color: #000000;">&#40;</span>aNew, <span style="color: #000000;">&#123;</span>|a|a<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>=aOld<span style="color: #000000;">&#91;</span>i,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">IF</span> nAt = <span style="color: #000000;">0</span>  <span style="color: #B900B9;">// Yani bizim table da arad???m?z yok ise yenidir.</span><br />            aAdd<span style="color: #000000;">&#40;</span>aDelete, aOld<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ENDIF</span>   <br />    <span style="color: #00C800;">NEXT</span>    <br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#123;</span>aInsert, aChange, aDelete<span style="color: #000000;">&#125;</span></div>[/code:1ntsxlo8] Edit : Please go this link [url:1ntsxlo8]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?p=232576#p232576[/url:1ntsxlo8]
Compare two arrays
can you compare two arrays to see if there are equal elements? for example: in an array I have "AAAAA","BBBBB","CCCCC" "AAAAA","BBBBB","CCCCC" "BBBBB","BBBBB","BBBBBB" on another I have "AAAAA","BBBBB","CCCCC" "AAAAA","BBBBB","CCCCC" "AAAAA","BBBBB","CCCCC" is there a function that lets you know that the line "AAAAA", "BBBBB", "CCCCC" is present in the other array? I need this operation because at the time the beach structure is built, the program automatically recognizes the areas where the umbrellas are located and creates a base rate: it could happen that the operator has already entered some tariffs for the same sector or has entered some tariffs for a sector that in the modification structure does not exist or there is no given element the user could cancel all the tariffs and insert new ones from scratch or the procedure could make a check and see if there are records that have some equal fields IDLISTINO | IDELEMENTO | FIELD | DAYS for a sample [img:26uip3i3]https&#58;//i&#46;postimg&#46;cc/g0LsjnJC/jj&#46;jpg[/img:26uip3i3] on up there is a new array calculated down there is the array with oldest tariffs the check must be made by idlistino,idelemento, giorni,idsettore How I can resolve it ?
Compare two arrays
Silvio, the new release FWH 19.05 offers new functions [quote:8dyc398p]Additional features: cSearch can be a string or array of strings. In case of array, the earliest occurance is reported. If lWholeWord is .t., only whole words are matched. Eg: FW_ATI( "EAR", "Years Hear Ear", nil, nil, .T. ) --> 12, but not 2. If lSkipQuotes is .t., the search skips any text inside quotes, "...", '...' or [...] Eg: FW_ATI( "NEAR", 'He said "it is near" but it is not near', nil, nil, nil, .t. ) --> 36 but not 16 If @cFound is specified as 7th parameter by reference, the exact match found in the string is returned. Eg: In the above case it returns "near". If cReplace is specified as 8th parameter and cString is by reference, cFound is replaced by cReplace. It the 9th parameter lAll is set to .T., all matches are returned as Array. In case of cReplace, all occurances are replaced by cReplace. - New function FW_STRICMP(): Compares the two strings ignoring the case. Respect SET EXACT off/on setting, subject to override Usage1: FW_StrICmp( cStr1, cStr2, [lExact] ) --> -1,0,+1 for less than, equal or greater than. 3rd parameter, if specified, overrides SET EXACT setting Usage2: FW_StrICmp( cStr1, cCompOperator, cStr2, [lExact] ) --> .f. / .t. Eg: FW_StrICmp( c1, ">=", c2, [nil,.t.,.f.] ) --> .t./.f. Operator "==" forces exact comparison. In other cases 4th paramter specifies if comparision is exact and if omitted, default setting is used. [/quote:8dyc398p] regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Compare two arrays
[code=fw:3l1h3c96]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> SearchArray<span style="color: #000000;">&#40;</span> aSearch, aArray <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> n<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len <span style="color: #000000;">&#40;</span> aArray <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> aSearch<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> == aArray<span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> .and. ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aSearch<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> == aArray<span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> .and. ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aSearch<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> == aArray<span style="color: #000000;">&#91;</span> n, <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> n<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br />&nbsp;</div>[/code:3l1h3c96]
Compare two arrays
nice make some test
Compare two hours
Just a quick observation .. why can't you not change them to values and compare the numbers ? [code=fw:ctoy14dn]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Imagine you have cTime1=<span style="color: #ff0000;">"10.55"</span> and cTime2=<span style="color: #ff0000;">"13.44"</span>,<br />is there a <span style="color: #00C800;">function</span> <span style="color: #0000ff;">to</span> know <span style="color: #00C800;">if</span> cTime1>cTime2 ?<br /><br /> </div>[/code:ctoy14dn] [code=fw:ctoy14dn]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />lOK := .F.<br /><br />nTIME1 := VAL<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"10.55"</span><span style="color: #000000;">&#41;</span><br />nTIME2 := VAL<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"13.44"</span><span style="color: #000000;">&#41;</span><br /><br />nDIFF := nTIME1 - nTIME2<br /><br /><span style="color: #00C800;">IF</span> nDIFF > <span style="color: #000000;">0</span><br />    lOK := .T.   <br /><span style="color: #00C800;">ELSE</span><br />    lOK := .F.<br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span>lOK<span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:ctoy14dn] On the other hand still as "char" cTime2 would always be greater than cTime1 as you have them defined .. am I missing something here ?? <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> Rick Lipkin
Compare two hours
[code=fw:3az29yq6]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">Local</span> cTime1 := <span style="color: #ff0000;">"10:00"</span><br /><span style="color: #00C800;">Local</span> cTime2 := <span style="color: #ff0000;">"13:20"</span><br /><br /><span style="color: #00C800;">If</span> TimeAsSeconds<span style="color: #000000;">&#40;</span> cTime1 <span style="color: #000000;">&#41;</span> <= TimeAsSeconds<span style="color: #000000;">&#40;</span> cTime2 <span style="color: #000000;">&#41;</span><br /> ....<br /><span style="color: #00C800;">EndIf</span><br /><br /><span style="color: #00C800;">FUNCTION</span> TimeAsSeconds<span style="color: #000000;">&#40;</span> cTime <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">RETURN</span> VAL<span style="color: #000000;">&#40;</span> cTime <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">3600</span> + VAL<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span> cTime, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">60</span> + VAL<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span> cTime, <span style="color: #000000;">7</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:3az29yq6]
Compare two hours
Marco: Take a look at the TimeToSec function of xHarbour. This function converts the time in seconds and then you can compare seconds against seconds Regards
Compare two hours
Hi, anyone know a function to compare two hours ? Imagine you have cTime1="10.55" and cTime2="13.44", is there a function to know if cTime1>cTime2 ? Thanks in advance
Compare two hours
For xHarbour: MsgInfo(ElapTime( "10:55:00", "13:44:00" ))
Compare two hours
Ok. I am using TimeToSec() for this special situation. Thanks to all for the great support.
Compare two hours
[quote="Marco Turco":1nvc6zux]Hi, anyone know a function to compare two hours ? Imagine you have cTime1="10.55" and cTime2="13.44", is there a function to know if cTime1>cTime2 ? Thanks in advance[/quote:1nvc6zux] Marco, when I come back home Ican send you a function ( date1,ora1,date2,ora2) I use it to rent beach services
Compare two hours
I use this function: [code=fw:38xz1fy4]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> DRazlika<span style="color: #000000;">&#40;</span>dStartDate,cStartTime,dEndDate,cEndTime<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Return</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>dEndDate - dStartDate<span style="color: #000000;">&#41;</span> * <span style="color: #000000;">86400</span><span style="color: #000000;">&#41;</span> - TimeToSec<span style="color: #000000;">&#40;</span>cStartTime<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> + TimeToSec<span style="color: #000000;">&#40;</span>cEndTime<span style="color: #000000;">&#41;</span><br /> </div>[/code:38xz1fy4] ... and in PRG code is somethnig like this [code=fw:38xz1fy4]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//*** End_Time, Start_Time are string ("12:15", "13:15") </span><br />        dd2 :=alltrim<span style="color: #000000;">&#40;</span>End_Time<span style="color: #000000;">&#41;</span><br />        dd1 :=alltrim<span style="color: #000000;">&#40;</span>Start_Time<span style="color: #000000;">&#41;</span><br />        dd3 :=DRazlika<span style="color: #000000;">&#40;</span>@StartDate,@dd1,@End_Date,@dd2<span style="color: #000000;">&#41;</span>    <span style="color: #B900B9;">//*** Return dd3 in seconds</span><br />        dd4 :=int<span style="color: #000000;">&#40;</span>dd3/<span style="color: #000000;">86400</span><span style="color: #000000;">&#41;</span>                           <span style="color: #B900B9;">//*** No of days</span><br />        dd5 :=dd3-<span style="color: #000000;">&#40;</span>dd4*<span style="color: #000000;">86400</span><span style="color: #000000;">&#41;</span>                         <br />        dd6 :=int<span style="color: #000000;">&#40;</span>dd5/<span style="color: #000000;">3600</span><span style="color: #000000;">&#41;</span>                            <span style="color: #B900B9;">//*** No in hours</span><br />        dd7 :=<span style="color: #000000;">&#40;</span>dd5-dd6*<span style="color: #000000;">3600</span><span style="color: #000000;">&#41;</span>/<span style="color: #000000;">60</span>                     <span style="color: #B900B9;">//*** rest in minutes</span><br />...<br />...<br /> @ row ,<span style="color: #000000;">4</span> <span style="color: #0000ff;">say</span> <span style="color: #ff0000;">"Result: "</span>+str<span style="color: #000000;">&#40;</span>dd4,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">" days "</span>+str<span style="color: #000000;">&#40;</span>dd6,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">" hours "</span>+str<span style="color: #000000;">&#40;</span>dd7,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">" min"</span><br /><br /> </div>[/code:38xz1fy4] Regards Zupan Miran Slovenia
Compare two objects
Hi, all ! How to check the equivalence of two objects (e.g. fonts) ?
Compare two objects
Natter, I have not tried it, but you might try: if(oObject1 = oObject2,.t.,.f.) James
Compare two objects
No, if you write oObject1 = oObject2 you'll get an error
Compare two objects
This run OK for me [code=fw:e6q5jxv7]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> oObject1 == oObject2<br />&nbsp; &nbsp; &nbsp; ? <span style="color: #ff0000;">"Si"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp;</div>[/code:e6q5jxv7]
Compare two objects
Thank you ! My mistake was that to compare objects, I used the " = " sign, and it is necessary "=="
Comparing computers speed
<!-- m --><a class="postlink" href="http://www.geekpatrol.ca/2006/12/geekbench-comparison-december-2006/">http://www.geekpatrol.ca/2006/12/geekbe ... mber-2006/</a><!-- m --> Very interesting reading before buying a computer <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Compartiendo forms con mod_harbour!!!
Diseña tus forms y compártelas. Otros usuarios las modifican (herencia visual) y las vuelven a compartir... De esta forma los forms se convierten en entidades sociales autocontenidas, con plena funcionalidad que pueden ser compartidas y reutilizadas: [url:25yp1psn]https&#58;//harbour&#46;fourtech&#46;es/modharbour_samples/designer&#46;prg?20190825071550[/url:25yp1psn] compartida y modificada: [url:25yp1psn]https&#58;//harbour&#46;fourtech&#46;es/modharbour_samples/designer&#46;prg?20190825071943[/url:25yp1psn] Esta es una nueva era para el desarrollo xbase en la web Es la revolución mod_harbour !!! <!-- s:-D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":-D" title="Very Happy" /><!-- s:-D -->
Compartiendo...
Amigos, Colegas, He creado un blog para empezar a escribir sobre TMySQL (Conexión nativa a mysql y contribución de xHarbour) y desde luego de mi poca experiencia sobre xHarbour y FWH. A petición de unos amigos el tema principal es y será TMySQL. [url=http&#58;//wmormar&#46;blogspot&#46;com/:1apht5vd]BLOG WMORMAR[/url:1apht5vd] Esperemos sea de ayuda
Compartiendo...
William: Una alternativa más siempre es bienvenida y agradecida. Saludos
Compartiendo...
Amigo, Las ayudas siempre son bienvenidas y mas las que como la tuya ,como la de armando y como las de muchos amigos aca en el foro aportan sustancialmente en nuestra formacion, Enhorabuena y adelante, nuestros agardecimientos anticipados por tu esfuerzo, Ramon Paredes
Compartiendo...
Armando, Gracias y esperemos pronto tenga algo mas sustancioso Saludos
Compartiendo...
Ramón Paredes, Amigo, gracias por tus palabras, eso da ánimo a seguir Estaré informando de avances
Compartiendo...
Amigos, he publicado novedades en el blog [url=http&#58;//wmormar&#46;blogspot&#46;com:1xwxp6c9]WMORMAR BLOG[/url:1xwxp6c9]