Necesitamos poder justificar un texto largo en EasyReport, pero, aunque hacemos la configuración correcta, no se obtiene el resultado requerido.
![Image](https://hymplus.com/forofw/justificaEasy.png)
![Image](https://hymplus.com/forofw/justificaEasy2.png)
Leyendo la clase, pudimos encontrar un método que se encarga de justificar el texto, pero no sabemos como hacer el llamado en el prg
Code: Select all | Expand
*-- METHOD -------------------------------------------------------------------
* Name: SayMemoJust
* Description:
* Author: Timm Sodtalbers
*-----------------------------------------------------------------------------
METHOD SayMemoJust( nTop, nLeft, nWidth, nHeight, cText, oFont, nColor, nOrient, lVariHeight ) CLASS FW_EReport
LOCAL i, nSpaces
LOCAL nTmpHeight := 0
LOCAL lMemoPageBreak := .F.
LOCAL aText := ::MemoText( cText, nWidth, oFont )
LOCAL nLines := LEN( aText )
LOCAL aAbstand := ::oPrn:Cmtr2Pix( 0.2, 0.2 )
FOR i := 1 TO nLines
aText[i] := RTRIM( aText[i] )
nSpaces := ::MemoTextSpaces( aText[i] )
IF .NOT. EMPTY( aText[i] )
IF RIGHT( aText[i], 1 ) <> CHR( 127 )
IF nSpaces > 0 .AND. nOrient = 4
SETTEXTJUSTIFICATION( ::oPrn:hDCOut, ;
nWidth - ::GetTextWidth( aText[i], oFont ), nSpaces )
ENDIF
ELSE
aText[i] = LEFT( aText[i], LEN( aText[i] ) - 1 )
ENDIF
ENDIF
::Say( nTop, nLeft, aText[i], oFont,, nColor )
SETTEXTJUSTIFICATION( ::oPrn:hDCOut, 0, 0 )
nTop += oFont:nHeight + aAbstand[1]
nTmpHeight += oFont:nHeight + aAbstand[1]
IF nTmpHeight > nHeight .AND. lVariHeight = .F.
EXIT
ELSEIF nTop >= ::nPageBreak
//::PageBreak()
//lMemoPageBreak := .T.
//nTop := ::nNextRow
//nTmpHeight := nTop
ENDIF
NEXT
RETURN { nTmpHeight, lMemoPageBreak }
Code: Select all | Expand
PRINTAREA 1 OF oVRD ;
ITEMIDS { 176,177 } ;
ITEMVALUES { vArt,cTxto}