Reporting services: Print all pages

In SQL Server Reporting Services I would like to have an option to print all pages of the report, even though the report is split into multiple report pages in the user interface.

We currently have a report with the following:

  • one page per item
  • no option to print to pdf (intentionally removed per requirement; would otherwise be a possible solution: download to pdf and then print the whole pdf document)
  • possibility to print one page at a time

and would like the following change:

  • possibility to print all pages by a single user action

Answers


In order to manually manage printing, you need to write your own print methods. This has been covered extensively online, by frustrated ReportViewer developers.

Basically, the idea is that you create your own print renderer. You would render all report pages into images (either by filestream or memorystream), and pass the images to the printer. A word of advice, is if you decide to use MemoryStream (which is the easier method, as it doesn't require cleanup), keep in mind that if your reports are very large, you may end up with out of memory issues.

Having a custom print method will give you full control on the report printing.

A MSDN article on the topic can be found at http://msdn.microsoft.com/en-us/library/ms252091%28VS.80%29.aspx

Also, if you google "Custom printing reportviewer", you will find many articles relating to this topic.


Need Your Help

A smart garbage collector for sharing subranges of arrays?

arrays garbage-collection theory language-implementation

In this popular question about why substring takes O(n) in C#, one of the main answers provided argued that if a large array were allocated and substrings computed by having the new strings just

Converting a structure to an intptr

c# class marshalling intptr

I have a class definition as follows: