Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Progress Bar function !!!! 1

Status
Not open for further replies.

lilys

Programmer
Jul 30, 2001
10
0
0
US
Someone has made a program or function that showing us a progress bar, this is becuase I download a program but it's not working well so I need to show a percent of advance for some aplication, I apreciate any kind of help. . .

Thanks
Liliana
 
I gave up bar charts in the move from DOS to Windows and went with the Wait Window command and showed percent complete. Anyway, here are 2 DOS based routines you have have to play with and convert to Windows if you can not find any others.

David W. Grewe
Dave@internationalbid.com
 
David:

Si hablo español. . Sabes ya baje ese programa que me dices pero al correr mis reportes no me refresca la pantalla donde esta la barra de avance, este es mi codigo :

DO PCDONE WITH .t., 0, "Iniciando Proceso. . ."

DO PCDONE WITH .t., 70, "Calculando Ventas . . ."

Y despues de esto tengo un SQL Select ..

Por ejemplo corre el primer pcdone y el segundo con 70% no lo hace se queda el 0% . . tal vez no lo este usando bien,
te agradecreia me lo dijeras.

Gracias.
 
Lily:

No entendí bien si el problema es que no te refresca en porcentaje fijo enviado o si no se refleja el avance del SQL..

La idea es que el segundo parámetro pasado ("porcentaje") sea una variable dependiente justamente del avance.

Así, el SQL tendrá una línea "where" de la siguiente forma:

SELECT ...
...
WHERE pcdone(.t.,RECNO()/RECCOUNT()*100,'Calculando Ventas...')
...


Espero sea esta tu duda.

David.
 
Lo que pasa que yo pongo el avance del query antes de hacerlo ya que si lo pongo en la linea where se pierde ya que hago un sum y los registros varian por lo que no puedo poner el recno(), ya trate de hacerlo asi y pues no funciono bien, es por eso que mando el 70% antes del query y no me refresca la pantalla del PCDONE se queda en 0%, es decir no pone la barra del 70% . . Ese es mi problema . .

Muchas gracias
Liliana.

Asi no tengo en mi programa :

DO PCDONE WITH .t., 0, "Iniciando Proceso. . ."

DO PCDONE WITH .t., 70, "Calculando Ventas . . ."
(Este no avanza)

SELECT IIF(xaP[_CONS],C.Sinonimo,E.CteOriDes) AS CteOriDes,a.producto,;
SUM(IIF(A.linea='VT.RO',IIF(D.vtav='A',1.00,IIF(D.vtav='D',-1.00,0.00));
*E.volumen,0.00)) AS VR;
FROM ;
(cP_PathDBF+'ESVta.dbf') E,(cP_PathDBF+'Articulo.dbf') A,;
(cP_PathDBF+'Cliente.dbf') C,(cP_PathDBF+'Almacen.dbf') Z,;
(cP_PathDBF+'docto.dbf') D;
WHERE;
E.Fecha>=xaP[_DESDE] AND E.fecha<=xaP[_HASTA] AND;
E.Articulo=A.Articulo AND E.docto=D.docto AND;
E.almacen=Z.Almacen AND E.CteOriDes=C.CLiente AND;
E.Docto<>'@COT' AND !a.producto$'VAR .,GTS .ADU' ;
GROUP BY 1 INTO TABLE (xaP[_TMP1]+'.DBF')


DO PCDONE WITH .t., 80, &quot;Espere un momento. . .&quot;
 
Liliana:

1. A mí si me funciona bien. ¿Tendremos el mismo PCDONE?

2. También funciona bien cuando pongo campo SUM(). Quizás, al utilizar muchas tablas, las funciones se confunden. Podrías probar con RECNO(A) y RECCOUNT(A).

3. El SQL tiene su propia &quot;progress bar&quot;. ¿No te conviene usarla (poniendo SET TALK ON como sentencia previa)? Lo único es que dice &quot;Ejecutando consulta...&quot;

4. La experiencia me dice que ante un SELECT muy complejo, por cuestiones de velocidad, conviene separarlo. Es decir, hacer una primera selección en un CURSOR y luego una segunda sobre éste. Quizá esto también simplifique el uso del PCDONE.

David.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top