Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Unanswered

How to print the same report multiple times

Posted on by 50

Hi all,

   I am trying to print the same report multiple times but it is not working, can anyone help me on  how to print the same report multiple times, i am using a boolean field in the request page if the boolean field is true i have to print the report two times, how is this can be done i am trying some ways but my ways are not working can anyone tell me how to do this, thank you for helping me.i am attaching the screen shots what i have done.

pastedimage1682350056747v1.png

Thanks & Regards

Satish

  • Sarath9999 Profile Picture
    Sarath9999 50 on at
    RE: How to print the same report multiple times

    Hi Supriya,

            Your code is working thanks for that, after that i got a problem of in the header i have given a heading, but the heading is not coming perfectly as i thought.  if the report is for 1 page then the heading is coming correctly, if the report is multiple pages it is not coming perfectly, for the original it has to show as Invoice and for the duplicate copy it has to show Invoice copy, that heading is coming like for 2nd page it is coming as a invoice  and for the 1st page it is coming as a invoice copy, it is mainly occuring  when i have multiple pages are there, for the heading i am using the set and getData, if anyone can give suggestions it will  be better for me, thanks for your suggestions.

    Thanks & Regards,

    Satish

  • Sypriya Guarav Profile Picture
    Sypriya Guarav 25 on at
    RE: How to print the same report multiple times

    dataitem(CopyLoop; Integer)

           {

               DataItemTableView = SORTING(Number) order(ascending);

               column(Number; Number)

               {

               }

               dataitem(PageLoop; Integer)

               {

                   DataItemTableView = SORTING(Number)

                                       WHERE(Number = CONST(1));

                   column(OutputNo; OutputNo)

                   {

                   }

               }

            }

     trigger OnPreDataItem()

               begin

                       NoOfCopies := 4

                   NoOfLoops := NoOfCopies;

                   IF NoOfLoops <= 0 THEN

                       NoOfLoops := 1;

                   CopyText := '';

                   SETRANGE(Number, 1, NoOfLoops);

                   OutputNo := 1;

               end;

    u need to do this code on the report and add ur Report layout on one list and refer Standard report 206 for this

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans