Programatically printing using Report Services

  • Is there a way to either through a sproc/trigger or programatically to cause a report to print through Report Services? I cannot find anything on printing in Report Services on MSDN or Google... Every article I read on Report Services is about emailing it to a user or having them manually go in and print. I don't understand what the aversion is to just printing the darn report!

    If anyone can help I'd really appreciate it. Either through article(s) or example or sample code.

  • Reports are delivered either

    A: Upon user request, to a browser

    B: On a schedule to an email address or network location (or other if you've rolled your own extension), or

    C: Through the Repoting Services Web Service, as a byte stream to the calling client.

    In the case of user request, it's polite to let them decide if they want to print the report.  (Or you could try to push some javascript at the bottom of the page that would call the document print method on the OnLoad event.  I've never tried it but that's what I'd try first.)

    If it's sent via email, or sent to a network location, then forced printing isn't an option.

    In the third case, however, where you've pulled the byte stream via the web service, then you can call whatever print methods are available to you from the target client, such as pulling an HTML report, stuffing it into a browser control, and firing the print method of the control.  Or you can pull a pdf report, save it as a file, and pipe the file to a printer.

    There's also a client-side ActiveX printing control for Reporting Services 2005.  I've only noodled with it nominally several months ago, and don't remeber the specifics.  Try searching MSDN for that.

    -Eddie

    Eddie Wuerch
    MCM: SQL

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply