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 :
Microsoft Dynamics GP (Archived)
Unanswered

UDF Comment Text field on invoice form

(0) ShareShare
ReportReport
Posted on by 130

 I need to show the UDF CMMTTEXT field on an invoice in its entirety - none of this 79 character limit junk.

 If I add the field on it's own, and set the 'Display Type' to 'Data'  - it shows me the comment for the next record.  I also attempted to set it to 'Last Occurrence', but got this error: 

 

Undefined Symbol 'accum_virt_F00749D02740Comment Text_LST_0'

 I attempted to create a calculated field to hold the data and display it - but ran into the 79 character limit.  I can't use the 4 different comment fields because the text I have to fit is 260 characters.

 Thanks!!

*This post is locked for comments

I have the same question (0)
  • winthropdc Profile Picture
    on at

    You need to use a series of calculated fields using Report Writer (RW) user defined functions. Is this SOP?

    RW_SOPHDRCommentText()

    in integer IN_Type;    { SOP Type of Document }
    in string IN_Number;   { SOP Number of Document }
    in integer IN_characters;  { Number of Characters per Line }
    in integer IN_line;    { Line Number to Return }

    RW_SOPLINECommentText() 

    in integer IN_Type;    { SOP Type of Document }
    in string IN_Number;   { SOP Number of Document }
    in long IN_LineItem;   { Line Item Sequence of Line }
    in long IN_Component;  { Component Sequence of Line }
    in integer IN_characters;  { Number of Characters per Line }
    in integer IN_line;    { Line Number to Return }

    Otherwise you can use

    RW_ParseString()

    in string IN_string;    { String Field to Parse }
    in integer IN_characters;  { Number of Characters per Line }
    in integer IN_line;    { Line Number to Return }

    There are also RW_POPHDRCommentText and RW_POPLINECommentText.

    For more info have a look at this blog post:

    http://blogs.msdn.com/developingfordynamicsgp/archive/2008/09/01/using-the-built-in-report-writer-functions.aspx

    David Musgrave [MSFT]
    Escalation Engineer - Microsoft Dynamics GP
    Microsoft Dynamics Support - Asia Pacific

    Microsoft Dynamics (formerly Microsoft Business Solutions)
    http://www.microsoft.com/Dynamics

    mailto:David.Musgrave@online.microsoft.com
    http://blogs.msdn.com/DevelopingForDynamicsGP

    Any views contained within are my personal views and not necessarily Microsoft policy.
    This posting is provided "AS IS" with no warranties, and confers no rights. 

     

     

  • jammerjam Profile Picture
    130 on at

     Thanks for the info - but it looks like I'll stilll run into the 79 character limit problem - won't I?

    Additional testing resulted in varied results - nothing I could count on reliably, which leaves me at the same point I was at before I started.

    I tested using RW_SOPHDRCommentText() - which sometimes returned data for the 3rd row, othertimes just sent a blank line (and then proceeded to return data for the 4th line). Note: each line was 80 characters..

    My test: RW_SOPHDRCommentText 3 {Header_SOPNumber} 80 {line #}

     The data format was consistant across invoices, but the results weren't.

  • winthropdc Profile Picture
    on at

    Was there a carriage return in the comment?  That could cause a blank line.

    The RW function is using a command which will break at a carriage return or at the first space before the limit given, in this case 80 characters.

    David Musgrave [MSFT]
    Escalation Engineer - Microsoft Dynamics GP
    Microsoft Dynamics Support - Asia Pacific

    Microsoft Dynamics (formerly Microsoft Business Solutions)
    http://www.microsoft.com/Dynamics

    mailto:David.Musgrave@online.microsoft.com
    http://blogs.msdn.com/DevelopingForDynamicsGP

    Any views contained within are my personal views and not necessarily Microsoft policy.
    This posting is provided "AS IS" with no warranties, and confers no rights. 

  • jammerjam Profile Picture
    130 on at

    Some of tests do have carriage returns, so it makes sense that it would break.

    However, this still doesn't get me past instances where the length of the data in the CMMTTEXT field is > ~320.  In those cases, the logic GP uses to break the lines up is thrown out the door and the resulting data on the invoice is fragments of each line.

  • winthropdc Profile Picture
    on at

    Why should the size make any difference?

    The rw_ParseString function would probably not allow a text field passed in. So it is limited to a string of 255 being passed in and limited to 80 characters coming back.

    The specific SOP and POP functions will work fine.

    David Musgrave [MSFT]
    Escalation Engineer - Microsoft Dynamics GP
    Microsoft Dynamics Support - Asia Pacific

    Microsoft Dynamics (formerly Microsoft Business Solutions)
    http://www.microsoft.com/Dynamics

    mailto:David.Musgrave@online.microsoft.com
    http://blogs.msdn.com/DevelopingForDynamicsGP

    Any views contained within are my personal views and not necessarily Microsoft policy.
    This posting is provided "AS IS" with no warranties, and confers no rights. 

     

  • jammerjam Profile Picture
    130 on at

    Allow me to re-state the problem I'm trying to get past:  I'm storing 500 characters in the CMMTTEXT field of SOP10106.  I need to display all characters on the invoice form.

     How?

  • Rich Mikolainis Profile Picture
    705 on at

    I'm having the same issue. Why is it so difficult to just add a comment field to a report?!?!?!?!

    This would take literally 15 seconds using Crystal Reports.

    Whats the logic behind Microsoft not allowing to just insert the comment field and instead needing to break it down into multiple lines using calculated fields?

  • Victoria Yudin Profile Picture
    22,769 on at

    For what it's worth, when people start asking about adding notes or comments to GP reports is when I start steering them toward Crystal or SSRS.  

  • Jason Kaczmarek Profile Picture
    115 on at

    Wouldn't using Cyrstal Reports create an extra step to be able to print invoices?  I've only used it a couple of times and when I ran a sample report I created, I had to provide my username and password every time I opened it.  It just seems like an unnecessary amount of clicking and typing when the print button (for RW) is right there on the form.  I don't think I could sell that to our mostly unsophisticated users.  Now if there was a way to put a print button on the SOP entry form and have it automatically open up a crystal report with the currently open invoice, then that wouldn't be so bad.  I'll have to look into that.

    I have the same issue with the RW limits.  We provide services that sometimes require lengthy descriptions and their not fitting in RW.  I haven't tried the RW functions yet; however, it sounds like that would be another option.

  • Victoria Yudin Profile Picture
    22,769 on at

    Jason,

    That's exactly what our product, GP Reports Viewer, does - you 'replace' the RW report with your Crystal report, all the other GP functionality is the same and the users do not have to do anything differently.  We have a demo of the SOP replacement functionality on our website: www.gpreportsviewer.com/.../gprv_sopreports.htm.

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 > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans