Tuesday 8 August 2006

Programmatically printing reports ... SP2 = Ahhh!

As I mentioned in a previous post Phills Philosophies: Programmatically printing reports ... SP2 = Ouch! printing reports directly to a printer had some undesirable effects when using SP2.

Well thanks to some assistance from Daniel Reib on the MSDN forums we discovered that not only did I need to set the printing points as per a comment by Keith Walton, I also needed to explicitly set the PageHeight and PageWidth.

I was able to retireve these easily enough via the web service and then based on the page sizing set the Landscape property in the DefaultPageSetting for the document.

My next trick is to intergrate what is now two command line apps (one for printing and one for report mailing) so we have a single application that provides all means of distributing the rendered reports.

No comments: