Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Report Writer - concatenating multiple calculation fields

Posted on by 9,142

Hi

Having fun with a rather complex SOP Blank layout.  I am trying to tidy up some of the formatting to link disparate calculations into a sentence.

E.g.

1st Calculation:  Type String

Conditional: SOP_HDR_WORK.DiscountAvailableAmount >0

True Case: "To receive the"

False Case:  ""

2nd Calculation:  Type Currency

Conditional: SOP_HDR_WORK.DiscountAvailableAmount >0

True Case: SOP_HDR_WORK.DiscountAvailableAmount

False Case: 0

3rd Calculation:  Type String

Use RW_Format to convert the currency calculation above to string

4th Calculation: Type String

Calculated:  1st Calculation # 3rd Calculation

Result:  only the result from the first calculation shows

Note:  I have also tried the same format with two straight string calculations.

If I do:  String Constant # Calculated field

it works fine.

Any ideas - I feel like I am overlooking something really simple!

Cheers

Heather

*This post is locked for comments

  • Heather Roggeveen Profile Picture
    Heather Roggeveen 9,142 on at
    RE: Report Writer - concatenating multiple calculation fields

    Hi

    This is a very old post - but I just came looking for the same answer - so Lyn, your response was perfect and worked perfectly on the same situation for me.

    Cheers

    Heather

  • Verified answer
    Lyn Barr Profile Picture
    Lyn Barr on at
    RE: Report Writer - concatenating multiple calculation fields

    This is an old post, but I just wanted to update the thread for the benefit of anyone looking for the correct answer.

    From reading another post, I discovered that the answer is to STRIP each calculated field within the final, concatenated field.  See below for the original reply.

    Tristan Thor Clores responded on 24 Jul 2013 6:28 PM

    Use the STRIP function to CAT the 2 string fields together:

    STRIP(SOP_HDR_WORK.Customer Name )  # STRIP(SOP_HDR_WORK.Customer Number )

    My sample above will print the Customer Name and Customer Number together on one field.

  • soma Profile Picture
    soma 24,406 on at
    RE: Report Writer - concatenating multiple calculation fields

    Have you tried to check whether the both calculated fields are showing/displaying the values in separately?

    Hope this helps!!!

  • RE: Report Writer - concatenating multiple calculation fields

    hello, is concatenation (CAT) works for calculated fields. when I apply this function to two calculated fields, it shows only first calculated field, not 2nd. both calculated fields are string type, any suggestion ?

  • Suggested answer
    Naga Kiran Profile Picture
    Naga Kiran on at
    RE: Report Writer - concatenating multiple calculation fields

    Heather,

    Did you try by setting 'Evaluate After' dropdown to the 3rd calculation field while defining the 4th calculation field. I'm not sure that option available when you modify a report from Dynamics GP but I am sure its available in Dex Environment.

  • L Vail Profile Picture
    L Vail 65,271 on at
    RE: Report Writer - concatenating multiple calculation fields

    Thanks Soma

    Been down that road. Your instructions work great on their own, but not when concatenated to something else.

    Kind regards,

    Leslie

  • soma Profile Picture
    soma 24,406 on at
    RE: Report Writer - concatenating multiple calculation fields

    See the blow my post.

    community.dynamics.com/.../converting-dollars-and-cents-to-words-in-gp-report-writer.aspx

    Hope this helps!!!

  • L Vail Profile Picture
    L Vail 65,271 on at
    RE: Report Writer - concatenating multiple calculation fields

    Heather,

    I gave it a try and it yielded the same results as the first one. I'm like you, seems like there's something easy that we are both missing. If we can get it to a string that prints, I bet we could figure out a way to get it formatted properly.

    I'll have to give this some thought.  If you solve the problem, I'd love to know the answer.

    Kind regards,

    Leslie

  • Heather Roggeveen Profile Picture
    Heather Roggeveen 9,142 on at
    RE: Report Writer - concatenating multiple calculation fields

    Hi

    I originally used that to convert the currency field and it came out as e.g. 100.00000 - but I wanted the $ and 2dp to show so went looking and found this post:  blogs.msdn.com/.../using-the-built-in-report-writer-functions.aspx

    I downloaded the document and saw that the RW_Format could be used to convert to string and give me the format that I wanted so I used that one.

    I won't have a chance to test whether using the CUR_STR option would make a difference, but let's assume it does - can I then still get the format of the $ and 2dp that I need?

    Cheers

    Heather

  • L Vail Profile Picture
    L Vail 65,271 on at
    RE: Report Writer - concatenating multiple calculation fields

    Hi,

    I do not have gp installed here, or I would try it, but have you tried using the CUR_STR global function to convert the currency value to a string?

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