Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Showing Wrong Quantity in different no of copies

Posted on by 3,027

Hi

   When i print single copy it is showing correct Qty. Suppose i gave 1 no of copy then on second copy in Details it shows Quantity 40 if actual Quantity is 20. It gets doubled. If 3 no of copies then on 3#rd copy it shows 60.

Thanks

*This post is locked for comments

  • Verified answer
    Marcellus Profile Picture
    Marcellus 2,735 on at
    RE: Showing Wrong Quantity in different no of copies

    Hi Jsshivalik,

    That is because of the way the RDLC report is handling the data. Because you are using the SUM method in RDLC for the scope of the report it will summarise all the Quantities sent through. Run your report in preview and go to help/about this page to see your data.

    I think you should create a Global Variable for your Total Quantity, add it to your dataset and calculate it in C/AL.

    For example if you look at Report 206, TotalAmount is a Global Variable and in the Sales Invoice Line - OnAfterGetRecord() trigger you will see this line of code: TotalAmount += Amount;

    You can do the same in your report after receiving the Lines you can add them to the TotalQuantity variable and display that in your RDLC report instead of using the SUM method.

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans