hai...could navision change line?
i want to add purchase comment line in purchase header (Purchase Order Report)
I want to add code like VbCrLf (In visual basic or Visual basic .NET)
PurchaseCommentLine.SETRANGE("Document Type",PurchaseCommentLine."Document Type"::Order);
PurchaseCommentLine.SETRANGE("No.","No.");
IF PurchaseCommentLine.FINDSET THEN
REPEAT
IF PurchaseCommentLine.Comment <> '' THEN
CommentText := CommentText + ' ' + PurchaseCommentLine.Comment;
UNTIL PurchaseCommentLine.NEXT = 0;
--> this ' ' code , how to be change line?
like if we use "ENTER" button in our PC
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
One is use an array and a page header loop
If you have the Purch comment line as a indented dataitem on the report for the Purch header add.
OnPreDataItem() //of thePurch Comment Line Dataitem
OnAfterGetRecord()
Create muliple pageloop, headers(1) & (2) etc to 10
in the sections->code add
on the pageloop header (2) add
Etc, Etc for 3 to 10
add a text box on each section sourceexp CommentText[1], 2 & 3 for each section.
it will allow 10 lines of comment text
I have a report that does this - i can post on the web & post the link if my explanation is not clear.
another ugly way, personally I would put this in a function "GetComments" and call it from the onaftergetrecord
getComments;
*i guess i could use array to clean that code up :oops:
Then you can add a textbox with sourceexp text1+text2+text3..etc
Set tablebox to multiline=yes and make the box big.
one thing to monitor that if all the comments together are larger than the field can handle then you will get an error, unless you make multiple fields.
First array method prints the header then loops thru comment lines and add them one after the other - not showing output if it doesn't exist.
second method forces you to allocate space for the textboxes if the comment exist or not.
but it's always god to have more than 1 choice. as i said above i have a picking ticket that prints multiple comment lines (max10) i can share as an example if needed (uses array method)
I hope this is the thing you are trying to make happen???
http://www.BiloBeauty.com
http://www.autismspeaks.org
Ok thanks a lot Savatage
I changet my mind
i use array like you told me
I set there's only 5 line default for the comment
thank you for your answer