Enrico,
This aSeries error in fixed in FWH 16.08
thanks
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
DEFINE DIALOG oDlg
ACTIVATE DIALOG oDlg;
ON INIT TEST()
RETURN NIL
STATIC FUNCTION TEST()
LOCAL oPrn, oGraph
LOCAL cTit := "CLIENTI"
LOCAL aDat := { { 2016, 10, 100 } }
LOCAL i
PRNLANDSCAPE()
PRINT oPrn NAME "Fatturato " + LOWER( cTit ) PREVIEW
PAGE
oGraph = TGraph():New()
oGraph:lXGrid = .T.
oGraph:lYGrid = .T.
oGraph:lDotted = .F.
oGraph:lTitle = .T.
oGraph:lLegends = .F.
oGraph:cTitle = "FATTURATO " + cTit
oGraph:nBarSep = 100
oGraph:lxVal = .T.
oGraph:lViewVal = .T.
oGraph:cTitX = "FATTURATO"
oGraph:cTitY = "ANNI"
oGraph:aSeries = { { "", RGB( 109, 177, 124 ), 1, .F. } }
oGraph:aYVals = {}
oGraph:aData = { {} }
FOR i = 1 TO LEN( aDat )
AADD( oGraph:aYVals, LTRIM( STR( aDat[ i, 1 ] ) ) + IF( i > 1, " (" + LTRIM( STR( aDat[ i, 2 ] ) ) + "%)", "" ) )
AADD( oGraph:aData[ 1 ], aDat[ i, 3 ] )
NEXT
oGraph:Print( oPrn, 5 * oPrn:nVertRes() / 66, 5 * oPrn:nHorzRes() / 80, 70 * oPrn:nHorzRes() / 80, 56 * oPrn:nVertRes() / 66 )
ENDPAGE
ENDPRINT
PRNPORTRAIT()
RETURN NIL
Error description: Error BASE/1087 Argument error: --
METHOD Print( oPrn, nTop, nLeft, nWidth, nHeight ) CLASS TGraph
LOCAL nRight, nBottom, nI, nResV
LOCAL cOldBitmap:= ::cBitmap
LOCAL aOldF := { oClone( ::aFont[1] ), oClone( ::aFont[2] ), ;
oClone( ::aFont[3] ), oClone( ::aFont[4] ), ;
oClone( ::aFont[5] ), oClone( ::aFont[6] ), ;
oClone( ::aFont[7] ), oClone( ::aFont[8] ), ;
oClone( ::aFont[9] ) }
::oPrn := oPrn
::nTRight := 1
::nTLeft := 0
::nTCent := 2
::cBitmap := " "
nRight := nLeft + nWidth
nBottom := nTop + nHeight
if !Empty( ::hDC ) // Add this
::oWnd:ReleaseDC()
endif // Add this
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 101 guests