Página 1 de 1

memo printing with TReport

Publicado: Jue Ene 08, 2009 5:13 pm
por Guest
Hi,
when I print memos with TReport the horizontal separator line is printed
after the first line and not after the last (an example is attached).
I use this code:
REPORT oReport ...
COLUMN OF oReport TITLE "Bezeichnung" CHARSIZE 48 DATA " "
....
oReport:nGridStyle := rgHORIZONTAL
oReport:OnChange := {|| ::PrintMemo( oReport ) }
....
METHOD PrintMemo( oReport ) CLASS TFormPrint
local cTmp, nIndex, cLine
local cText := ...
local nLineLen := 500
local nOffSet := 1
local nTextLen := Len( cText )
oReport:BackLine( 1 )
do while nOffSet <= nTextLen
cLine := MemoLine( cText, nLineLen, 1,,, .t., @nOffSet )
oReport:StartLine()
oReport:PrintAtCol( 4, cLine )
oReport:EndLine()
enddo
oReport:Newline()
RETURN NIL
Has anyone an idea what I could change?
Best regards, Timm.


Attached files

memo printing with TReport

Publicado: Jue Ene 08, 2009 8:03 pm
por ignacio
Timm,
Try to move the line ::OnChange() (aprox. line 492) on Report.prg so its
before of:
IF ! ::lSummary
IF ::nGridStyle > rgVERTICAL .AND. ! ::lFirstRow
::PrintHorzLine( rlSINGLE, .T. )
ENDIF
ENDIF
Any feedback is welcome.
Regards,
--
Ignacio Ortiz de Zúñiga
Xailer support / Soporte de Xailer
http://www.xailer.com
http://www.xailer.info
"Timm Sodtalbers" <info@sodtalbers-it.de> escribió en el mensaje
news:[email=4966256b@svctag-j7w3v3j....]4966256b@svctag-j7w3v3j....[/email]
> Hi,
>
> when I print memos with TReport the horizontal separator line is printed
> after the first line and not after the last (an example is attached).
> I use this code:
>
> REPORT oReport ...
> COLUMN OF oReport TITLE "Bezeichnung" CHARSIZE 48 DATA " "
> ...
> oReport:nGridStyle := rgHORIZONTAL
> oReport:OnChange := {|| ::PrintMemo( oReport ) }
> ...
> METHOD PrintMemo( oReport ) CLASS TFormPrint
>
> local cTmp, nIndex, cLine
> local cText := ...
> local nLineLen := 500
> local nOffSet := 1
> local nTextLen := Len( cText )
>
> oReport:BackLine( 1 )
>
> do while nOffSet <= nTextLen
>
> cLine := MemoLine( cText, nLineLen, 1,,, .t., @nOffSet )
>
> oReport:StartLine()
> oReport:PrintAtCol( 4, cLine )
> oReport:EndLine()
>
> enddo
>
> oReport:Newline()
>
> RETURN NIL
>
> Has anyone an idea what I could change?
>
> Best regards, Timm.
>
>
>
>
>

memo printing with TReport

Publicado: Jue Ene 08, 2009 8:03 pm
por ignacio
Timm,
Try to move the line ::OnChange() (aprox. line 492) on Report.prg so its
before of:
IF ! ::lSummary
IF ::nGridStyle > rgVERTICAL .AND. ! ::lFirstRow
::PrintHorzLine( rlSINGLE, .T. )
ENDIF
ENDIF
Any feedback is welcome.
Regards,
--
Ignacio Ortiz de Zúñiga
Xailer support / Soporte de Xailer
http://www.xailer.com
http://www.xailer.info
"Timm Sodtalbers" <info@sodtalbers-it.de> escribió en el mensaje
news:[email=4966256b@svctag-j7w3v3j....]4966256b@svctag-j7w3v3j....[/email]
> Hi,
>
> when I print memos with TReport the horizontal separator line is printed
> after the first line and not after the last (an example is attached).
> I use this code:
>
> REPORT oReport ...
> COLUMN OF oReport TITLE "Bezeichnung" CHARSIZE 48 DATA " "
> ...
> oReport:nGridStyle := rgHORIZONTAL
> oReport:OnChange := {|| ::PrintMemo( oReport ) }
> ...
> METHOD PrintMemo( oReport ) CLASS TFormPrint
>
> local cTmp, nIndex, cLine
> local cText := ...
> local nLineLen := 500
> local nOffSet := 1
> local nTextLen := Len( cText )
>
> oReport:BackLine( 1 )
>
> do while nOffSet <= nTextLen
>
> cLine := MemoLine( cText, nLineLen, 1,,, .t., @nOffSet )
>
> oReport:StartLine()
> oReport:PrintAtCol( 4, cLine )
> oReport:EndLine()
>
> enddo
>
> oReport:Newline()
>
> RETURN NIL
>
> Has anyone an idea what I could change?
>
> Best regards, Timm.
>
>
>
>
>

memo printing with TReport

Publicado: Vie Ene 09, 2009 8:01 am
por Guest
Ignacio,
yes, putting ::OnChange() before IF ! ::lSummary solves the problem.
oReport:BackLine( 1 ) causes trouble on page breaks in some cases.
Therefore I use this code now:
REPORT oReport ...
COLUMN OF oReport TITLE "Bezeichnung" CHARSIZE 48 DATA MemoLine(
::GetMemoText(), ::nLineLen, 1,,, .t. )
....
oReport:nGridStyle := rgHORIZONTAL
oReport:OnChange := {|| ::PrintMemo( oReport ) }
METHOD PrintMemo( oReport ) CLASS TFormDrucken
local i
local cText := ::GetMemoText()
local nLines := MLCount( cText, ::nLineLen,,, .t. )
FOR i := 2 TO nLines
oReport:StartLine()
oReport:PrintAtCol( 4, MemoLine( cText, ::nLineLen, i,,, .t. ) )
oReport:EndLine()
NEXT
RETURN NIL
Best regards, Timm.
"Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> schrieb im
Newsbeitrag news:[email=49664dde@svctag-j7w3v3j....]49664dde@svctag-j7w3v3j....[/email]
> Timm,
>
> Try to move the line ::OnChange() (aprox. line 492) on Report.prg so its
> before of:
>
> IF ! ::lSummary
> IF ::nGridStyle > rgVERTICAL .AND. ! ::lFirstRow
> ::PrintHorzLine( rlSINGLE, .T. )
> ENDIF
> ENDIF
>
> Any feedback is welcome.
>
> Regards,
>
> --
> Ignacio Ortiz de Zúñiga
> Xailer support / Soporte de Xailer
> http://www.xailer.com
> http://www.xailer.info
> "Timm Sodtalbers" <info@sodtalbers-it.de> escribió en el mensaje
> news:[email=4966256b@svctag-j7w3v3j....]4966256b@svctag-j7w3v3j....[/email]
>> Hi,
>>
>> when I print memos with TReport the horizontal separator line is printed
>> after the first line and not after the last (an example is attached).
>> I use this code:
>>
>> REPORT oReport ...
>> COLUMN OF oReport TITLE "Bezeichnung" CHARSIZE 48 DATA " "
>> ...
>> oReport:nGridStyle := rgHORIZONTAL
>> oReport:OnChange := {|| ::PrintMemo( oReport ) }
>> ...
>> METHOD PrintMemo( oReport ) CLASS TFormPrint
>>
>> local cTmp, nIndex, cLine
>> local cText := ...
>> local nLineLen := 500
>> local nOffSet := 1
>> local nTextLen := Len( cText )
>>
>> oReport:BackLine( 1 )
>>
>> do while nOffSet <= nTextLen
>>
>> cLine := MemoLine( cText, nLineLen, 1,,, .t., @nOffSet )
>>
>> oReport:StartLine()
>> oReport:PrintAtCol( 4, cLine )
>> oReport:EndLine()
>>
>> enddo
>>
>> oReport:Newline()
>>
>> RETURN NIL
>>
>> Has anyone an idea what I could change?
>>
>> Best regards, Timm.
>>
>>
>>
>>
>>
>
>

memo printing with TReport

Publicado: Vie Ene 09, 2009 8:01 am
por Guest
Ignacio,
yes, putting ::OnChange() before IF ! ::lSummary solves the problem.
oReport:BackLine( 1 ) causes trouble on page breaks in some cases.
Therefore I use this code now:
REPORT oReport ...
COLUMN OF oReport TITLE "Bezeichnung" CHARSIZE 48 DATA MemoLine(
::GetMemoText(), ::nLineLen, 1,,, .t. )
....
oReport:nGridStyle := rgHORIZONTAL
oReport:OnChange := {|| ::PrintMemo( oReport ) }
METHOD PrintMemo( oReport ) CLASS TFormDrucken
local i
local cText := ::GetMemoText()
local nLines := MLCount( cText, ::nLineLen,,, .t. )
FOR i := 2 TO nLines
oReport:StartLine()
oReport:PrintAtCol( 4, MemoLine( cText, ::nLineLen, i,,, .t. ) )
oReport:EndLine()
NEXT
RETURN NIL
Best regards, Timm.
"Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> schrieb im
Newsbeitrag news:[email=49664dde@svctag-j7w3v3j....]49664dde@svctag-j7w3v3j....[/email]
> Timm,
>
> Try to move the line ::OnChange() (aprox. line 492) on Report.prg so its
> before of:
>
> IF ! ::lSummary
> IF ::nGridStyle > rgVERTICAL .AND. ! ::lFirstRow
> ::PrintHorzLine( rlSINGLE, .T. )
> ENDIF
> ENDIF
>
> Any feedback is welcome.
>
> Regards,
>
> --
> Ignacio Ortiz de Zúñiga
> Xailer support / Soporte de Xailer
> http://www.xailer.com
> http://www.xailer.info
> "Timm Sodtalbers" <info@sodtalbers-it.de> escribió en el mensaje
> news:[email=4966256b@svctag-j7w3v3j....]4966256b@svctag-j7w3v3j....[/email]
>> Hi,
>>
>> when I print memos with TReport the horizontal separator line is printed
>> after the first line and not after the last (an example is attached).
>> I use this code:
>>
>> REPORT oReport ...
>> COLUMN OF oReport TITLE "Bezeichnung" CHARSIZE 48 DATA " "
>> ...
>> oReport:nGridStyle := rgHORIZONTAL
>> oReport:OnChange := {|| ::PrintMemo( oReport ) }
>> ...
>> METHOD PrintMemo( oReport ) CLASS TFormPrint
>>
>> local cTmp, nIndex, cLine
>> local cText := ...
>> local nLineLen := 500
>> local nOffSet := 1
>> local nTextLen := Len( cText )
>>
>> oReport:BackLine( 1 )
>>
>> do while nOffSet <= nTextLen
>>
>> cLine := MemoLine( cText, nLineLen, 1,,, .t., @nOffSet )
>>
>> oReport:StartLine()
>> oReport:PrintAtCol( 4, cLine )
>> oReport:EndLine()
>>
>> enddo
>>
>> oReport:Newline()
>>
>> RETURN NIL
>>
>> Has anyone an idea what I could change?
>>
>> Best regards, Timm.
>>
>>
>>
>>
>>
>
>

memo printing with TReport

Publicado: Vie Ene 09, 2009 10:26 am
por ignacio
Timm,
Glad to help and thanks for the feedback.
Regards,
--
Ignacio Ortiz de Zúñiga
Xailer support / Soporte de Xailer
http://www.xailer.com
http://www.xailer.info
"Timm Sodtalbers" <info@sodtalbers-it.de> escribió en el mensaje
news:4966f5a2$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Ignacio,
>
> yes, putting ::OnChange() before IF ! ::lSummary solves the problem.
>
> oReport:BackLine( 1 ) causes trouble on page breaks in some cases.
> Therefore I use this code now:
>
> REPORT oReport ...
> COLUMN OF oReport TITLE "Bezeichnung" CHARSIZE 48 DATA MemoLine(
> ::GetMemoText(), ::nLineLen, 1,,, .t. )
> ...
> oReport:nGridStyle := rgHORIZONTAL
> oReport:OnChange := {|| ::PrintMemo( oReport ) }
>
> METHOD PrintMemo( oReport ) CLASS TFormDrucken
>
> local i
> local cText := ::GetMemoText()
> local nLines := MLCount( cText, ::nLineLen,,, .t. )
>
> FOR i := 2 TO nLines
> oReport:StartLine()
> oReport:PrintAtCol( 4, MemoLine( cText, ::nLineLen, i,,, .t. ) )
> oReport:EndLine()
> NEXT
>
> RETURN NIL
>
> Best regards, Timm.
>
> "Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> schrieb im
> Newsbeitrag news:[email=49664dde@svctag-j7w3v3j....]49664dde@svctag-j7w3v3j....[/email]
>> Timm,
>>
>> Try to move the line ::OnChange() (aprox. line 492) on Report.prg so its
>> before of:
>>
>> IF ! ::lSummary
>> IF ::nGridStyle > rgVERTICAL .AND. ! ::lFirstRow
>> ::PrintHorzLine( rlSINGLE, .T. )
>> ENDIF
>> ENDIF
>>
>> Any feedback is welcome.
>>
>> Regards,
>>
>> --
>> Ignacio Ortiz de Zúñiga
>> Xailer support / Soporte de Xailer
>> http://www.xailer.com
>> http://www.xailer.info
>> "Timm Sodtalbers" <info@sodtalbers-it.de> escribió en el mensaje
>> news:[email=4966256b@svctag-j7w3v3j....]4966256b@svctag-j7w3v3j....[/email]
>>> Hi,
>>>
>>> when I print memos with TReport the horizontal separator line is printed
>>> after the first line and not after the last (an example is attached).
>>> I use this code:
>>>
>>> REPORT oReport ...
>>> COLUMN OF oReport TITLE "Bezeichnung" CHARSIZE 48 DATA " "
>>> ...
>>> oReport:nGridStyle := rgHORIZONTAL
>>> oReport:OnChange := {|| ::PrintMemo( oReport ) }
>>> ...
>>> METHOD PrintMemo( oReport ) CLASS TFormPrint
>>>
>>> local cTmp, nIndex, cLine
>>> local cText := ...
>>> local nLineLen := 500
>>> local nOffSet := 1
>>> local nTextLen := Len( cText )
>>>
>>> oReport:BackLine( 1 )
>>>
>>> do while nOffSet <= nTextLen
>>>
>>> cLine := MemoLine( cText, nLineLen, 1,,, .t., @nOffSet )
>>>
>>> oReport:StartLine()
>>> oReport:PrintAtCol( 4, cLine )
>>> oReport:EndLine()
>>>
>>> enddo
>>>
>>> oReport:Newline()
>>>
>>> RETURN NIL
>>>
>>> Has anyone an idea what I could change?
>>>
>>> Best regards, Timm.
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>

memo printing with TReport

Publicado: Vie Ene 09, 2009 10:26 am
por ignacio
Timm,
Glad to help and thanks for the feedback.
Regards,
--
Ignacio Ortiz de Zúñiga
Xailer support / Soporte de Xailer
http://www.xailer.com
http://www.xailer.info
"Timm Sodtalbers" <info@sodtalbers-it.de> escribió en el mensaje
news:4966f5a2$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Ignacio,
>
> yes, putting ::OnChange() before IF ! ::lSummary solves the problem.
>
> oReport:BackLine( 1 ) causes trouble on page breaks in some cases.
> Therefore I use this code now:
>
> REPORT oReport ...
> COLUMN OF oReport TITLE "Bezeichnung" CHARSIZE 48 DATA MemoLine(
> ::GetMemoText(), ::nLineLen, 1,,, .t. )
> ...
> oReport:nGridStyle := rgHORIZONTAL
> oReport:OnChange := {|| ::PrintMemo( oReport ) }
>
> METHOD PrintMemo( oReport ) CLASS TFormDrucken
>
> local i
> local cText := ::GetMemoText()
> local nLines := MLCount( cText, ::nLineLen,,, .t. )
>
> FOR i := 2 TO nLines
> oReport:StartLine()
> oReport:PrintAtCol( 4, MemoLine( cText, ::nLineLen, i,,, .t. ) )
> oReport:EndLine()
> NEXT
>
> RETURN NIL
>
> Best regards, Timm.
>
> "Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> schrieb im
> Newsbeitrag news:[email=49664dde@svctag-j7w3v3j....]49664dde@svctag-j7w3v3j....[/email]
>> Timm,
>>
>> Try to move the line ::OnChange() (aprox. line 492) on Report.prg so its
>> before of:
>>
>> IF ! ::lSummary
>> IF ::nGridStyle > rgVERTICAL .AND. ! ::lFirstRow
>> ::PrintHorzLine( rlSINGLE, .T. )
>> ENDIF
>> ENDIF
>>
>> Any feedback is welcome.
>>
>> Regards,
>>
>> --
>> Ignacio Ortiz de Zúñiga
>> Xailer support / Soporte de Xailer
>> http://www.xailer.com
>> http://www.xailer.info
>> "Timm Sodtalbers" <info@sodtalbers-it.de> escribió en el mensaje
>> news:[email=4966256b@svctag-j7w3v3j....]4966256b@svctag-j7w3v3j....[/email]
>>> Hi,
>>>
>>> when I print memos with TReport the horizontal separator line is printed
>>> after the first line and not after the last (an example is attached).
>>> I use this code:
>>>
>>> REPORT oReport ...
>>> COLUMN OF oReport TITLE "Bezeichnung" CHARSIZE 48 DATA " "
>>> ...
>>> oReport:nGridStyle := rgHORIZONTAL
>>> oReport:OnChange := {|| ::PrintMemo( oReport ) }
>>> ...
>>> METHOD PrintMemo( oReport ) CLASS TFormPrint
>>>
>>> local cTmp, nIndex, cLine
>>> local cText := ...
>>> local nLineLen := 500
>>> local nOffSet := 1
>>> local nTextLen := Len( cText )
>>>
>>> oReport:BackLine( 1 )
>>>
>>> do while nOffSet <= nTextLen
>>>
>>> cLine := MemoLine( cText, nLineLen, 1,,, .t., @nOffSet )
>>>
>>> oReport:StartLine()
>>> oReport:PrintAtCol( 4, cLine )
>>> oReport:EndLine()
>>>
>>> enddo
>>>
>>> oReport:Newline()
>>>
>>> RETURN NIL
>>>
>>> Has anyone an idea what I could change?
>>>
>>> Best regards, Timm.
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>