VS2010 ReportViewer RRS feed

  • Question

  • Hi all!

    I use a control ReportViewer to view and to print reports.

    I see a report in the ReportViewer but I want to skip this operation and directly to print the report programmatically. How can I do it?


    Sunday, November 13, 2011 8:55 AM

All replies

  • Sure.
    One approach would be to call the ReportExecution web service as documented here:
    This usually involves calling .Render with the appropriate parameters for your report.
    Something like:
    _results = rsexec.Render("pdf", _deviceinfo, out _extension, out _encoding, out _mimeType, out _warnings, out _streamIDs);
    Then write out the results as you would normally handle a binary stream in your application.
    Monday, November 21, 2011 3:21 PM