Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

No Copies not working properly in report

(0) ShareShare
ReportReport
Posted on by

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
    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
    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
    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
    on at
    RE: No Copies not working properly in report

    This is a report created by myself

  • Suggested answer
    Alexander Ermakov Profile Picture
    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
    47,789 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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics NAV (Archived)

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans