Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Development environment limit length of text in report

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

  • ulleput Profile Picture
    ulleput 5 on at
    RE: Development environment limit length of text in report

    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

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,696 Super User 2024 Season 2 on at
    RE: Development environment limit length of text in report

    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
    ulleput 5 on at
    RE: Development environment limit length of text in report

    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
    YUN ZHU 73,696 Super User 2024 Season 2 on at
    RE: Development environment limit length of text in report

    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

  • Suggested answer
    DAnny3211 Profile Picture
    DAnny3211 9,272 Super User 2024 Season 1 on at
    RE: Development environment limit length of text in report

    hi

    look this

    social.technet.microsoft.com/.../sql-server-service-fails-to-start-error-1067-the-process-terminated-unexpectedly

    DAniele

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans