Click here to Skip to main content
Click here to Skip to main content

Custom ListView class for Report Generation, Part 1

, 14 Mar 2005
Rate this:
Please Sign up or sign in to vote.
A simple class generating printible reports.

Screenshot

Introduction

I've been using nashcontrol for generating reports, but had a difficult time incorporating the code into existing applications. In addition, his control does not provide the same functionality for list view controls. Nash’s control also had a drawback that it would crash for spaces in the column titles. This control is basically a wrapper for quick integration into existing code for printing listview controls.

Using the code

MyListView control is derived from System.Windows.Forms.ListView, so use it like the native ListView control. The only additional functionality is that for printing the ListView.

// call the print method for displaying the Nash’s print dialog.
this.listView1.Print();

Screenshot

Points of Interest

In the report, the column width is determined by the width of the columns in the ListView. For a detailed overview of the printing process, refer to the referenced article.

History

This is the first version, as soon as I get some time, I'll complete the tutorial.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Uraan Software Solutions
Founder Uraan Software Solutions
Germany Germany
We are a software development and consultancy firm based in Lahore, Pakistan.

Comments and Discussions

 
GeneralError in 'system.drawing.dll' Pinmembercapuccino_fr3-Apr-06 1:18 
GeneralRecommended Changes Pinmembersreejith ss nair28-Jun-05 0:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.141223.1 | Last Updated 15 Mar 2005
Article Copyright 2005 by Uraan Software Solutions
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid