How to print the documents using active reports 11

Posted by: abhayraut on 4 October 2017, 12:45 am EST

  • Posted 4 October 2017, 12:45 am EST

    I am trying to print the documents, but somehow it gives me a blank page on print, I have 3 documents in sequence,none of them gets printed, can someone help me with the issue.

    I have tried all of this:

    Dim rpt As New SectionReport

        With rpt.Document
    
    
            '.Printer.PrinterSettings.FromPage = 1
            '.Printer.PrinterSettings.ToPage = .Pages.Count
            .Printer.PrinterSettings.PrintRange = System.Drawing.Printing.PrintRange.AllPages
            .Printer.PrinterSettings.Copies = 1
            '.Printer.PrinterSettings.Collate = True
    
            '.Printer.PrinterSettings.PrintRange = Drawing.Printing.PrintRange.SomePages
            .Printer.Print()
    
            '.Print(False, False, False)
    
  • Posted 5 October 2017, 2:25 am EST

    Hello,

    Since you are printing all pages, you do not need to give the page range here. You can simply use the code as follows to print the report:

    
    Dim rpt = New SectionReport1()
    rpt.Run(False)
    Dim sectionDocument = rpt.Document
    sectionDocument.Print(True, True, False)
    
    

    In order to access Print method through SectionDocument class, you need to add GrapeCity.ActiveReports.Viewer.Win.v11 reference to the project. Also, as mentioned in the code, make sure that you add a reference for the GrapeCity.ActiveReports namespace in your project using Imports (Visual Basic.NET) or using (C#) statement.

    Thanks,

    Deepak Sharma

Need extra support?

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

Learn More

Forum Channels