Section-Document Print Methods are not available

Posted by: chris on 5 November 2024, 10:30 am EST

    • Post Options:
    • Link

    Posted 5 November 2024, 10:30 am EST

    I upgrade my active reports from 17 to 18 and updated the nuget package dependencies to version 18 as well. I have installed both GrapeCity.ActiveReports.Viewer.Win(18.2.0) and MESCIUS.ActiveReports.Viewer.Win(18.2.0) packages. Both of the last 2 lines result in an error. The first being that PrintExtension does not exist and the second being that SectionDocument does not contain a definition for Print.

    public static void PrintReportToPrinter(SectionReport rpt, string printer)
    { 
       try {
              rpt.Document.Printer.PrinterName = printer;
              rpt.Run(false);
              var sectionDocument = rpt.Document;
              PrintExtension.Print(sectionDocument, false, false);
              sectionDocument.Print(true, true, false);
          }
       catch (Exception) {
          throw;
       }
    }
  • Posted 5 November 2024, 10:45 am EST

    Nevermind the necessary project was missing the dependency.

Need extra support?

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

Learn More

Forum Channels