Zeilenerweiterung wird vom vorherigem Artikel gedruckt
Rolf Mettler
Hallo zusammenIch habe einen Kunden neu übernommen und bei dem wird der Artikeltext im Beleg via unten stehendem GenerateScript angedruckt. Ist nun der Artikeltext auf einem Artikel leer, wird der Text vom Vorgänger angedruckt. Aus meiner Sicht wird die Variable jeweils korrekt zurückgesetzt (iText =""). Hat jemand eine Idee?
---
Dim iText As String
'temporärer Tabulator
Dim itemTxt As String()
iText =""
iText = Iif(LD.IsEmpty(DocumentRow("RowRowItems.U_ArtTyp")),"","Artikeltyp: " + DocumentRow("RowRowItems.U_ArtTyp"))
' Detaildaten, wird nur angedruckt, wenn UDF Belegdruck auf Ja - Text aus Artikel
If (Not LD.IsEmpty(DocumentRow("RowRowItems.UserText"))) And Document("U_BelegDet")="j" and DocumentRow("ItemCode").Substring(0)<>"Z" Then
iText += vbcrlf + LD.MultiLine(DocumentRow("RowRowItems.UserText"))
End If
' Detaildaten, wenn Artikel = Z - Text aus Zeile
If (Not LD.IsEmpty(DocumentRow("Text"))) and DocumentRow("ItemCode").Substring(0)="Z" Then
iText += vbcrlf + LD.MultiLine(DocumentRow("Text"))
End If
' Detaildaten, wenn Artikel = YY-FREI aus Zeile
If (Not LD.IsEmpty(DocumentRow("Text"))) and DocumentRow("ItemCode")="YY-FREI" Then
iText += vbcrlf + LD.MultiLine(DocumentRow("Text"))
End If
' Temporärer Tabulator
itemTxt = LD.CreateColumnArray(iText)
oItemText.Text = LD.MultiLineRTF(itemTxt(0))
---
Besten Dank und Gruss Rolf
Philipp Knecht
Hi RolfInitialisier die textbox mit:
oItemText.Text = "" am Anfang
hth
0
Please sign in to leave a comment.
Comments
0 comments