Click here to Skip to main content
15,886,362 members
Articles / Programming Languages / Visual Basic

Printing Reports in .NET

Rate me:
Please Sign up or sign in to vote.
4.85/5 (70 votes)
26 Aug 2008CPOL11 min read 439.3K   15.6K   257  
Using the library presented, you can print reports from C# and other .NET languages
// Copyright (c) 2003, Michael Mayer
// See License.txt that should have been included with this source file.
// or see http://www.mag37.com/csharp/articles/Printing/

using System;

namespace ReportPrinting
{
	/// <summary>
	/// An interface to be used in the Strategy design pattern.
	/// ReportDocument will call the single method MakeDocument()
	/// when it wants to be formatted and made into a complete document.
	/// </summary>
	public interface IReportMaker
	{
        /// <summary>
        /// This function is called prior to printing.
        /// The implementer of this function is passed a handle
        /// to a ReportDocument object that needs to be setup.
        /// </summary>
        /// <param name="reportDocument">Handle to the ReportDocument object</param>
        /// <remarks>
        /// It is desirable to call reportDocument.ClearSections() before
        /// adding new sections to the reportDocument.
        /// </remarks>
        void MakeDocument(ReportDocument reportDocument);
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions