Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

Line Number_Increment

Posted on by 1,520

Hello,

I would like to display a number for each line in a Report Writer report that should increment with each line.

I used the Line Number_Increment function in a calculated field but it keeps increasing each tine I print a report and using Line Number_Re-set as instructed in this article   http://support.microsoft.com/kb/857285/pt-br it displays number 1 in all the lines.

My question is how do I display an incremented number for each line that should reset to number when I print a new report.

 

Thank you,

Saad

*This post is locked for comments

  • Suggested answer
    soma Profile Picture
    soma 24,406 on at
    RE: Line Number_Increment

    For custom report, you need to create a RW function for displaying line number or follow my first suggestion.

    This KB article run for SOP Blank document not custom report.

    Hope this helps!!!

  • Bsaad Profile Picture
    Bsaad 1,520 on at
    RE: Line Number_Increment

    Hi Soma,

    Thank you for the help I used the article as an example I'm using the function for a custom report unfortunately it's not working for me.

    Regards,

    Saad

  • Suggested answer
    soma Profile Picture
    soma 24,406 on at
    RE: Line Number_Increment

    I have created a test report for your requirement and everything working fine for me.

    Please check your two calculated fields as below.

    1. Line Number Increment

    Result Type: Integer

    Calculated: FUNCTION_SCRIPT( rw_IncrementLineNumber 1 SOP_LINE_WORK.Line Item Sequence 1 )

    Note: You should add this calculated field in Report Header 2(H2) in SOP Blank Document Report.

    2. Line Number_Re-set

    Result Type: Integer

    Calculated: FUNCTION_SCRIPT( rw_ResetLineNumber "1" )

    Note: You should add this calculated field to Report Footer with visibility false(Invisible) and Display Type as Data.

    This KB article only for all SOP Blank Documents.

    Hope this helps!!!

  • Suggested answer
    soma Profile Picture
    soma 24,406 on at
    RE: Line Number_Increment

    Saad,

    Better create a temp table with same format like report table and additionally add a column Row_Number then add this table to the report with using table relationship. Then add the Row_Number column to your report. While printing report copy all the row from report table to temp table with the sequence of Row_Number starting from 1 to n (end of the row number).

    Note: After printed the report clear the temp table values.

    Hope this helps!!!

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans