My notes about C#, .NET, ASP.NET, Windows Forms, Azure, PowerShell, …

Print RDLC Report without Preview

Sometimes you have a report which you want to print without showing a preview in ReportViewer. You can print an RDLC report programmatically using LocalReport object and CreateStreamCallback callback function.

There is an article in MSDN which describes how to print an RDLC report programmatically. Based on the idea of that article, I created an extension method for LocalReport class, called Print to make it easier to print the report without showing the report or any dialog:

It has two overloads:

Print(): It uses the default page settings of the report.

Print(PageSettings): It uses the page settings object which is passed to the method.

You May Also Like

I’ve been a .NET developer since 2004. During these years, as a developer, technical lead and architect, I’ve helped organizations and development teams in design and development of different kind of applications including LOB applications, Web and Windows application frameworks and RAD tools.
As a teacher and mentor, I’ve trained tens of developers in C#, ASP.NET MVC and Windows Forms.
As an interviewer I’ve helped organizations to assess and hire tens of qualified developers.
I really enjoy learning new things, problem solving, knowledge sharing and helping other developers. I'm usually active in .NET related tags in stackoverflow to answer community questions. I also share technical blog posts in my blog as well as sharing sample codes in GitHub.

Your email address will not be published. Required fields are marked *

Comment

Name *

Email *

Website

About

My name is Reza and I’ve been a .NET developer since 2004.

During these years, as a developer, technical lead and architect, I’ve helped organizations and development teams in design and development of different kind of applications including LOB applications, Web and Windows application frameworks and RAD tools. As a teacher and mentor, I’ve trained tens of developers in C#, ASP.NET MVC and Windows Forms. As an interviewer I’ve helped organizations to assess and hire tens of qualified developers.

I really enjoy learning new things, problem solving, knowledge sharing and helping other developers. I’m usually active in .NET related tags in stackoverflow to answer community questions. I also share technical blog posts in my blog as well as sharing sample codes in GitHub.