none
How do you Print automatically from ReportViewer?? RRS feed

  • Question

  •  

    Hi All

     

    I'm having real trouble printing from the reportviewer. I am able to render to a .pdf file but cannot find out how to print automatically, without first previewing the report. I found an example within the msdn help files (here: http://msdn2.microsoft.com/en-us/library/ms252091(VS.80).aspx ) but it seems fairly complex - there must be an easier way! Does anyone have any tips? I am already rendering the report to a file, so maybe there is a way of automatically printing a file on my computer? This might be an easier way of doing things?

     

    Thanks

     

    Rowan

    Wednesday, January 30, 2008 5:14 PM

All replies

  • Move this thread from VB general forum to Visual Studio Report Controls forum for the better answer. This forum mainly discusses reporting functionality including the integrated report designer and viewer controls for adding rich data reports to Windows Forms and ASP.NET applications. Thanks.

    Friday, February 1, 2008 1:54 AM
    Moderator
  • I've not done the auto printing before, but I have made use of the Report Render feature in the past.

     

    The example looks pretty easy though. They could easily Render to document too, it's just they chose to Render the report to a Stream instead.

     

    The main part of it is: report.Render(...). In the Export method, they setup the document format (margins, page size, etc), which gets passed onto the Render method.

     

    Could you please explain which part of it you don't understand so others could help you?

    Friday, February 1, 2008 3:42 AM