Options

How to write multible lines to a textbox.

ResenderResender Member Posts: 119
edited 2011-11-22 in Navision Attain
Hello all,
I'm currently tasked with writing code that will display when we can accept certain pallets on a transaction based on the country code of the delivery.
Now on one of the reports that need this, I need to display in the first line that we can trade in that pallet. and the second and 3th line should display that this can only be done when accepting our terms.

Example
!!! Tradepallets for UK !!! !!!Create receipt !!!
The receipt is binding for the contact and is the only proof of evidence if discussion arise's
See our terms of agreement.

I've searched but haven't found a sstraightforward answer, or one that can duplicate.
Thank you for your time

Answers

  • Options
    SavatageSavatage Member Posts: 7,142
    Going on the brief description you provided...

    You want it in one textbox?
    Have you thought about an array?
    Are these messages stored in Text Constants?

    Text001:!!! Tradepallets for UK !!! !!!Create receipt !!!
    Text002:The receipt is binding for the contact and is the only proof of evidence if discussion arise's
    Text003:See our terms of agreement.

    if "Country Code" = "UK" then
    TextVariable := Text001+' '+Text002+' '+Text003
    else TextVariable := Text002+' '+Text003;

    You also have to make your multiline text box large enough to show the message - it won't auto stretch.
    I would put each text in it's own section - showing & hiding depending on if it needs to be visible or not. Eliminating big blank spaces.
  • Options
    matttraxmatttrax Member Posts: 2,309
    Or set the multiline property on the text box to Yes. You can separate lines with back slashes (\)
  • Options
    ResenderResender Member Posts: 119
    Ok those indeed work thanks for the replies. :D
Sign In or Register to comment.