Print Section Report Non-Interactively in AR v16

Posted by: tniec on 13 May 2022, 10:55 am EST

  • Posted 13 May 2022, 10:55 am EST

    I have a C# windows forms legacy application that was developed using AR v10.

    I need to quickly migrate it to ARv16 to see if it will solve some problems for us before potentially making a “real” investment in upgrading to AR 16.

    I downloaded a trial of AR16 (we are licensed for v10) and used Nuget to get a number of DLLs that I appear to correspond to the AR10 versions. This has been haphazard but I have gotten rid of all the compiler problems so far.

    But one… I have the line:

    sectionReport.Document.Print(false,false,false);

    I don’t know what the parameters do exactly but the line should be causing the report to print non-interactively. i.e. it should not show a print dialog box etc.

    This line is not compiling as the document class seems to no longer have a print procedure. (I am pretty sure it used to have a Print(), that is, I don’t think this was an extension method.).

    What is the approach for printing non-interactively in AR16?

  • Posted 16 May 2022, 7:20 am EST

    Hello,

    Since ActiveReports 15 the Print(bool,bool,bool) method has been moved to the PrintingExtension of the Grapecity.ActiveReports.Viewer.Common assembly.

    To learn more on this please refer to the Breaking Changes page of our documentation.

    https://www.grapecity.com/activereportsnet/docs/latest/online/breaking-changes.html#:~:text=Now%20you%20should%20reference%20Viewer.Common%20if%20you%20need%20to%20use%20printing.

    For reference, I have also attached a sample application along with.

    PrintReport.zipPrintReport.zip

Need extra support?

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

Learn More

Forum Channels