Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)
Suggested answer

4 Address Lines

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am trying to Customize Check Printing and have Calculated Fields for 4 address line.  Vendor Address Line 1, Vendor Address Line 2, Vendor Address Line 3 and Vendor Address Line 4.  I am by no means a developer but thought I would be able to modify this report.  The lines of code for each address line is below. 

Address Line 1

FUNCTION_SCRIPT(rw_SelectAddrLine1""PM_Payment_WORK.Address 1PM_Payment_WORK.Address 2""""PM_Payment_WORK.CityPM_Payment_WORK.StatePM_Payment_WORK.Zip Code"" )

 

Address Line 2

FUNCTION_SCRIPT(rw_SelectAddrLine2""PM_Payment_WORK.Address 1PM_Payment_WORK.Address 2""""PM_Payment_WORK.CityPM_Payment_WORK.StatePM_Payment_WORK.Zip Code"" )

 

Address Line 3

FUNCTION_SCRIPT(rw_SelectAddrLine3""PM_Payment_WORK.Address 1PM_Payment_WORK.Address 2""""PM_Payment_WORK.CityPM_Payment_WORK.StatePM_Payment_WORK.Zip Code"" )

 

 

Below is what I added to try to get the 4th Address line to print…. The outcome is the report does not print Address Line 4

Address Line 4

FUNCTION_SCRIPT(rw_SelectAddrLine4""PM_Payment_WORK.Address 1PM_Payment_WORK.Address 2""""PM_Payment_WORK.CityPM_Payment_WORK.StatePM_Payment_WORK.Zip Code"" )

Can anyone help in determining the code I should use for Vendor Address Line 4 that will print the 4th line of the address and THEN the city, state, zip.... and I hope I've explained things sufficientl.

Thanks in advance!

Mary

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: 4 Address Lines

    Thanks everyone for your suggestions... I was able to fix it yesterday... YIPPEE!

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: 4 Address Lines

    Thanks Leslie -- I sent you a separate e-mail asking for the notepad file!

    I appreciate the help!

    Mary

  • Suggested answer
    L Vail Profile Picture
    L Vail 65,271 on at
    RE: 4 Address Lines

    You need to insert Address 3 into the formula where the "" marks appear after Address 2. Remove the first set of "" marks and insert Address 3 in each of the calculated fields. I always edit the package file to do this sort of thing. If you export the report to a package file, change the calculated fields to look like this:

    CalculatedField "Vendor Address Line 1"

    {

    EvaluateAfter ""

    Expression "'rw_SelectAddrLine'( 1 \"\" 'PM_Payment_WORK'.'Address 1''PM_Payment_WORK'.'Address 2''PM_Payment_WORK'.'Address 3'\"\" 'PM_Payment_WORK'.'City''PM_Payment_WORK'.'State''PM_Payment_WORK'.'Zip Code'\"\"  )  "

    ResultType "String"

    }

    CalculatedField "Vendor Address Line 2"

    {

    EvaluateAfter ""

    Expression "'rw_SelectAddrLine'( 2 \"\" 'PM_Payment_WORK'.'Address 1''PM_Payment_WORK'.'Address 2''PM_Payment_WORK'.'Address 3'\"\" 'PM_Payment_WORK'.'City''PM_Payment_WORK'.'State''PM_Payment_WORK'.'Zip Code'\"\"  )  "

    ResultType "String"

    CalculatedField "Vendor Address Line 3"

    {

    EvaluateAfter ""

    Expression "'rw_SelectAddrLine'( 3 \"\" 'PM_Payment_WORK'.'Address 1''PM_Payment_WORK'.'Address 2''PM_Payment_WORK'.'Address 3'\"\" 'PM_Payment_WORK'.'City''PM_Payment_WORK'.'State''PM_Payment_WORK'.'Zip Code'\"\"  )  "

    ResultType "String"

    }

    This doesn't come out real well on the forum, but I'd be happy to send you either the package file or the notepad file. If that's all you want to change, I'd also be willing to change your package file if you want to send it to me. (leslievail@earthlink.net)

    Kind regards,

    Leslie

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 Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans