Report Writer - concatenating multiple calculation fields

This question has suggested answer(s)

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

All Replies
  • Before displaying the concatenated  field(1st cal # 3rd cal), use the 1st and 3rd calculated fields in report to verify whether the both fields show values.

    Best Regards,

    Somakarpagamoorthy K | MS Dynamics GP - Developer

  • Sorry was meant to say in the original post that both fields return correct values if put on the report independently.

  • 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

    Leslie Vail, CPA, MVP, MCT, MCITP, MCP, MCITS
    ASCI, Inc.    *    PO Box 600965   *   Dallas, TX 75360    *   972-814-8550   *   leslievail@earthlink.net

  • 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

  • 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

    Leslie Vail, CPA, MVP, MCT, MCITP, MCP, MCITS
    ASCI, Inc.    *    PO Box 600965   *   Dallas, TX 75360    *   972-814-8550   *   leslievail@earthlink.net

  • See the blow my post.

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

    Hope this helps!!!

    Best Regards,

    Somakarpagamoorthy K | MS Dynamics GP - Developer

  • Thanks Soma

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

    Kind regards,

    Leslie

    Leslie Vail, CPA, MVP, MCT, MCITP, MCP, MCITS
    ASCI, Inc.    *    PO Box 600965   *   Dallas, TX 75360    *   972-814-8550   *   leslievail@earthlink.net

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

    Naga M. Siva Kiran, SE-III, email:mnskiran@outlook.com