page selection while printing

Posted by: jyotikas on 4 August 2017, 2:51 pm EST

  • Posted 4 August 2017, 2:51 pm EST

    Hi


    In my application there is a report with more than 2000 pages, what i would like to do is


    I would like to send pages 1,4,7,10,13,...... to printers tray1


    pages 2,5,8,11,... to tray2


    and pages 3,6,9,12,... to tray3


    can anybody suggest me code


    Thanks


     

  • Replied 4 August 2017, 2:51 pm EST

    You could try something along these lines. Beware that just because a certain printer numbers a tray as #1, doesn't mean the numerical ID is 1 for the PaperBin, for example PaperBin #1 might be 257, PaperBin #2 equals 258, etc.


            Dim lngC As Long, lngP As Long
            With YourActiveReport
                lngP = .Pages.Count - 1
               
                .Printer.PaperBin = 1
                .Printer.StartJob
                For lngC = 0 To lngP Step 3
                    .Printer.PrintPage .Pages(lngC)
                Next lngC
                .Printer.EndJob
               
                .Printer.PaperBin = 2
                .Printer.StartJob
                For lngC = 1 To lngP Step 3
                    .Printer.PrintPage .Pages(lngC)
                Next lngC
                .Printer.EndJob
               
                .Printer.PaperBin = 3
                .Printer.StartJob
                For lngC = 2 To lngP Step 3
                    .Printer.PrintPage .Pages(lngC)
                Next lngC
                .Printer.EndJob
            End With

  • Replied 4 August 2017, 2:51 pm EST

    Hi


    Thanks for solution but how do i get  'ActiveReportTriple' in my code


    is there any classs that i have to use or any namespace to import ?


     


     

  • Replied 4 August 2017, 2:51 pm EST

    i forgot to tell you that i am using vb.net 2005 would it make any diffrence


     

  • Replied 4 August 2017, 2:51 pm EST

    That was just a reference I used, sub in whatever your report name is.


    This is a forum for ActiveReports 2.0 for Visual Basic 6.0, there are seperate forumns for the .NET versions.


    http://www.datadynamics.com/forums/61/ShowForum.aspx
    http://www.datadynamics.com/forums/5/ShowForum.aspx

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels