RMCHART from file TXT

RMCHART from file TXT

Postby Vladimir Zorrilla » Mon Apr 06, 2009 11:56 pm

Friends

RMCHART from file TXT

http://rapidshare.com/files/218290764/RMC.ZIP.html

RMC.exe + RMCHART.dll read file RMC.TXT for graph

RMC.TXT

TYPECHART=SIMPLELINE
CAPTION=Importaciones por Pais Origen ABRIL 2008
XMINVALUE=0
XMAXVALUE=500
XTICKCOUNT=5
XSUNIT=
XSTEXT=Nº Despachos
YLABEL=AR*BR*CA*CH*CN*CO*CZ*DE*ES*FR*GB*HU*IN*IS*IT*JP*KR*MX*MY*PR*SG*TH*TR*TW*US
YSTEXT=Paises
YTICKCOUNT=25
BARSERIES=2,22,1,9,403,4,15,34,9,5,4,1,18,1,12,12,50,4,3,1,1,2,2,4,68

Explanation

Type Chart
TYPECHART=SIMPLELINE
Title Graph
CAPTION=Importaciones por Pais Origen ABRIL 2008
Value eje x
XMINVALUE=0
XMAXVALUE=500
XTICKCOUNT=5
XSUNIT=
XSTEXT=Nº Despachos
Values eje Y
YLABEL=AR*BR*CA*CH*CN*CO*CZ*DE*ES*FR*GB*HU*IN*IS*IT*JP*KR*MX*MY*PR*SG*TH*TR*TW*US
YSTEXT=Paises
YTICKCOUNT=25

Data
BARSERIES=2,22,1,9,403,4,15,34,9,5,4,1,18,1,12,12,50,4,3,1,1,2,2,4,68

Example code

Func gpaisRM
Local j,dplan:={},mplan:={},nombre:={},n,T:="",sLabels:="",k,cadbar:=""
Local mes:="4"//LTRIM(STR(VAL(ZZZMES(_VG("GPAIS_1")) )))
local cmd,CMD_:="SELECT SEA"+XCOD()+".PAIS_ORIGE,TA141.DESCRI,DGA"+XCOD()+".FCHNUMER FROM SEA"+XCOD()+" LEFT JOIN DGA"+XCOD()+" ON SEA"+XCOD()+".NUME_ORDEN=DGA"+XCOD()+".NUME_ORDEN LEFT JOIN TA141 ON SEA"+XCOD()+".PAIS_ORIGE=TA141.CODIGO WHERE YEAR(DGA"+XCOD()+".FCHNUMER)="+_VG("A20_19")+" AND MONTH(DGA"+XCOD()+".FCHNUMER)="+mes+" AND SEA"+XCOD()+".CODI_REGI='10'"
cmd_+=" ORDER BY SEA"+XCOD()+".PAIS_ORIGE"
VZ2QUERY(@cmd,CMD_)
For j=1 to cmd:nRowCount
cmd:Goto(j);cmd:Load()
IF (n:=ASCAN(mplan,cmd:FldGet(1)))=0
aadd(dplan,1 )
aadd(mplan,cmd:FldGet(1) )
aadd(nombre,subs(cmd:FldGet(2),1,15) )
sLabels+=cmd:FldGet(1)+"*"
ELSE
dplan[n]:=dplan[n]+1
ENDIF
Next j
sLabels:=subs(sLabels,1,len(sLabels)-1)
For k=1 to len(dplan)
if k=len(dplan)
cadbar+=ltrim(str(dplan[k]))
else
cadbar+=ltrim(str(dplan[k]))+","
endif
next k
T+="TYPECHART=SIMPLEBAR"+H()
T+="CAPTION=Importaciones por Pais Origen ABRIL "+ALLTRIM(_VG("A20_19"))+H()
T+="XMINVALUE=0"+H()
T+="XMAXVALUE=500"+H()
T+="XTICKCOUNT=5"+H()
T+="XSUNIT= "+H()
T+="XSTEXT=Nº Despachos "+h()
T+="YLABEL="+sLabels+H()
T+="YSTEXT=Paises "+h()
T+="YTICKCOUNT="+LTRIM(STR(len(dplan)))+H()
T+="BARSERIES="+cadbar+H()
MEMOWRIT("RMC.TXT",T)
cmd:Close()
winexec("RMC")
retu .t.
Function h
retu(chr(13)+chr(10))



T+="TYPECHART=SIMPLEBAR"+H()

Other values
SIMPLEBAR
PIE
DONUT
PYRAMID
HORIZONTALBAR
SIMPLELINE


Regards
ME INTERESA FW Y XHB POR SER OPEN SOURCE
Vladimir Zorrilla
 
Posts: 225
Joined: Tue Feb 28, 2006 4:25 pm
Location: PERU

Re: RMCHART from file TXT

Postby richard-service » Tue Apr 07, 2009 4:10 am

Hi

Thanks for your nice source code.

Regards,

Richard
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 87 guests