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
In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
memo printing with TReport
- ignacio
- Site Admin
- Mensajes: 9469
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
memo printing with TReport
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.
>
>
>
>
>
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.
>
>
>
>
>
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
- ignacio
- Site Admin
- Mensajes: 9469
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
memo printing with TReport
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.
>
>
>
>
>
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.
>
>
>
>
>
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
memo printing with TReport
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.
>>
>>
>>
>>
>>
>
>
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
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.
>>
>>
>>
>>
>>
>
>
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.
>>
>>
>>
>>
>>
>
>
- ignacio
- Site Admin
- Mensajes: 9469
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
memo printing with TReport
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.
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>
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.
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
- ignacio
- Site Admin
- Mensajes: 9469
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
memo printing with TReport
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.
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>
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.
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com