Page 1 of 1

IMPRIMIR GRAFICA

PostPosted: Fri Jun 28, 2019 1:22 am
by joseluisysturiz
Saludos, ya he logrado la generacion de graficas y el manejo de colores aleatorios en las BARRAS de la grafica, ahora me urge lo mas importante...IMPRIMIR LA GRAFICA, en una misma hoja donde tengo la impresion de los datos de un xbrowse que son los datos graficados, alguna sugerencias o ideas ya que en esto de las graficas es mi primera ves, ya mas o menos agarre las ideas, pero lo de la impresion no veo donde ni como hacerlo, desde ya...gracias..saludos... :shock:

Re: IMPRIMIR GRAFICA

PostPosted: Fri Jun 28, 2019 2:39 am
by cnavarro
Jose Luis, la clase tiene un método, no sé si te servirá
oGraph:PrintGraph( lPrev, oPrn, nY, nX, cFile, nPorY, nPorX )

Re: IMPRIMIR GRAFICA

PostPosted: Fri Jun 28, 2019 3:35 am
by joseluisysturiz
Saludos Navarro, reviso el methodo y luego comento, gracias... :shock:

Re: IMPRIMIR GRAFICA

PostPosted: Fri Jun 28, 2019 3:39 am
by joseluisysturiz
cnavarro wrote:Jose Luis, la clase tiene un método, no sé si te servirá
oGraph:PrintGraph( lPrev, oPrn, nY, nX, cFile, nPorY, nPorX )

Navarro, he buscado dicho methodo en TGraph.prg y no esta, no se si sera la version que tengo dice

// TGraph 2.0, FiveWin Graphics without vbx!
// Thanks to all FiveWin forum friends
// Autor: Alfredo Arteaga - 23/03/2008
// email: soporte@despachoarteaga.com.mx
// 15.03.2018 Alvaro Quintana Gráficos XY versión 1.1

donde puedo encontrar la ultima o una version mas nueva que tenga el methodo, en la version que tengo solo esta methodo
Print( oPrn, nTop, nLeft, nWidth, nHeight )

espero a ver si alguien puede enviar o decir de donde descargar ultima version, mi correo joseluisysturiz@yahoo.com, gracias... :shock:

Re: IMPRIMIR GRAFICA

PostPosted: Fri Jun 28, 2019 4:39 am
by nageswaragunupudi
TGraph comes as a part of FWH.
To get the latest version of TGraph, you need the latest version of FWH.

But even the latest version of TGraph in the latest version of FWH also has the METHOD Print( .. ) only.
There is no METHOD PrintGraph() even in the latest version of FWH.

Possible that Mr. Cristobal incorporated some changes in his personal version.

Are you sure the existing method Print(...) is not useful to you?

Re: IMPRIMIR GRAFICA

PostPosted: Fri Jun 28, 2019 6:27 am
by joseluisysturiz
I have not tried the methodo print, I imagine that it has everything necessary to print the graphic, I will try it and then comment, anyway I would like to see that methodo Navarro talks about to compare it, so you learn more, thanks... :shock:

No he probado el methodo print, imagino que tiene todo lo necesario para imprimir el grafico, lo intentare y luego comento, igual me gustaria ver ese methodo del que habla Navarro para compararlo, asi se aprende mas, gracias... :shock:

Re: IMPRIMIR GRAFICA

PostPosted: Fri Jun 28, 2019 12:46 pm
by armando.lagunas
haber si te sirve:

Code: Select all  Expand view

STATIC FUNCTION InformCierre( oBrw, oGraph )
 LOCAL oRpt, oPrn, aPos, aSiz, cFile

 SET 3DLOOK OFF
 PRINTER oPrn TO cPrintPDF FILE cFile  PREVIEW

 IF EMPTY( oPrn:hDC )
     RETURN NIL
 ENDIF

 aPos:=oPrn:Cmtr2Pix(0.50,11.5)
 aSiz:=oPrn:Cmtr2Pix(12.5, 5.5)

 oPrn:SetPage( 2 )   // 1=Papel Letter 8 1/2 x 11 in / 9=A4 210 x 297 mm

 SELECT PA25             ;   DBGOTOP()

 REPORT oRpt TITLE  " "," ","INFORME PROCESO DE PACKING N° "+PA18->NPRO+" - "+DTOC(PA18->FECH),"EMPRESA   : "+AllTrim(PA18->LOTE),"PRODUCTOR : "+AllTrim(PA18->CCSG)+"-"+AllTrim(PA18->NOMB),"ESPECIE   : "+PA18->ESPE+"-"+AllTrim(PA18->NOME),"VARIEDAD  : "+PA18->VARI+"-"+AllTrim(PA18->ETIQ)," "," "," "," "," "," "," "," "," "," "," " LEFT ;
    HEADER oGraph:Print(oPrn,aPos[1],aPos[2],aSiz[1],aSiz[2]),  cEmpresa, AllTrim(cDireccion)+" / "+AllTrim(cCiudad)+" / "+ AllTrim(cTelefono)
    TO DEVICE oPrn
...
...
...
 


resultado :

Image

Saludos.

Re: IMPRIMIR GRAFICA

PostPosted: Fri Jun 28, 2019 2:21 pm
by cnavarro
joseluisysturiz wrote:I have not tried the methodo print, I imagine that it has everything necessary to print the graphic, I will try it and then comment, anyway I would like to see that methodo Navarro talks about to compare it, so you learn more, thanks... :shock:

No he probado el methodo print, imagino que tiene todo lo necesario para imprimir el grafico, lo intentare y luego comento, igual me gustaria ver ese methodo del que habla Navarro para compararlo, asi se aprende mas, gracias... :shock:


Si, el método no es para integrar el graph en un documento
Sólo para imprimir esa gráfica.
El ejemplo de Armando es muy bueno

Re: IMPRIMIR GRAFICA

PostPosted: Fri Jun 28, 2019 5:14 pm
by joseluisysturiz
Armando es lo que busco, seguro me ayudara mucho, Navarro gracias, igual si puedes enviarme tu methodo para tenerlo presente si no es mucha molesta, gracias... :shock: