Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

No Copies not working properly in report

Posted on by Microsoft Employee

Hi everyone, I'm trying to create a shipment order but when I put 2 in my Number of Copies the report only prints one page.. and must have 3 pages understand?

So I have in Request Page

Expanded Type SubType SourceExpr Name Caption
0 Field NoOfCopies <Control1> N.º Cópias

And in my Code:

CopyLoop - OnPreDataItem()
NoOfLoops := 1 + ABS(NoOfCopies);
CopyText := '';
SETRANGE(Number,1,NoOfLoops);
OutputNo := 1;

CopyLoop - OnAfterGetRecord()
IF Number > 1 THEN BEGIN
CopyText := Text001;
OutputNo += 1;
END;
CurrReport.PAGENO := 1;
TotalQty := 0; // Item Tracking

CopyLoop - OnPostDataItem()


PageLoop - OnPreDataItem()
// Item Tracking:
IF ShowLotSN THEN BEGIN
TrackingSpecCount := 0;
OldRefNo := 0;
ShowGroup := FALSE;
END;

PageLoop - OnAfterGetRecord()

PageLoop - OnPostDataItem()

I cant figure what I need to do more.. Anyone can help?

5700.final.png

*This post is locked for comments

  • Marcellus Profile Picture
    Marcellus 2,735 on at
    RE: No Copies not working properly in report

    Hi Catia,

    Please post a screenshot of how your dataset is structured, so we can check where you put the copyloop and how is your indentation done first.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: No Copies not working properly in report

    Anyone can help? My report layout have in the list a group by the key No_Sales Header and by the Output no


  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: No Copies not working properly in report

    Already done that, I'm using the code of the report 208 (Sales Shipment)

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: No Copies not working properly in report

    This is a report created by myself

  • Suggested answer
    Alexander Ermakov Profile Picture
    Alexander Ermakov 28,094 on at
    RE: No Copies not working properly in report

    Can you just look at a standard similar report and copy the code from there?

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: No Copies not working properly in report

    Is this a standard report or a new or customized report ?

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