web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Development environment limit length of text in report

(0) ShareShare
ReportReport
Posted on by 5

Hello,

Im new to the development environment and struggling abit with a customized report.

Im trying to limit the output of characters in one specific column.

We use Word layout and not RDLC.

Currently there can be anywhere from 2 -> 8 characters in output, but i've set the width of the column in word to fit 5 characters. 

I would like to limit the output to 4 characters, so it leaves some space for the next column.

Data source: "Shipment Method Code"

I thought something like FORMAT(Data source: "Shipment Method Code", 4) could solve it, but I guess that only for date/time.

Hope someone has a solution that can help me.

Best Regards

Ulrik

I have the same question (0)
  • Suggested answer
    DAnny3211 Profile Picture
    11,397 on at
  • Suggested answer
    YUN ZHU Profile Picture
    95,331 Super User 2025 Season 2 on at

    Hi, You can use the following String Functions.

    COPYSTR Function (Code, Text)

    https://learn.microsoft.com/en-us/dynamics-nav/copystr-function--code--text-

    STRLEN Function (Code, Text)

    https://learn.microsoft.com/en-us/dynamics-nav/strlen-function--code--text-

    More detials: https://yzhums.com/6471/

    Hope this helps.

    Thanks.

    ZHU

  • ulleput Profile Picture
    5 on at

    Hi ZHU,

    I've tried with the COPYSTR function, but I might be doing something wrong.

    I've pasted a picture of the sting.

    I can compile it, but nothing is printed on the PDF now

    pastedimage1670489960635v1.png

  • Suggested answer
    YUN ZHU Profile Picture
    95,331 Super User 2025 Season 2 on at

    Hi, It seems that there is no value in the Shipment Method Code, you can add the unprocessed Shipment Method Code field above, and then compare.

    Hope this helps.

    Thanks.

    ZHU

  • ulleput Profile Picture
    5 on at

    YUN, sorry - it was my fault - i didnt think.

    the COPYSTR requires the string to be there already.

    So now, it works like it should.

    Thank you for your help.

    Solution shown below

    pastedimage1671005131981v1.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans