Click here to Skip to main content
Licence 
First Posted 14 Mar 2005
Views 52,609
Downloads 521
Bookmarked 25 times

Custom ListView class for Report Generation, Part 1

By Uraan Software Solutions | 14 Mar 2005
A simple class generating printible reports.
4 votes, 40.0%
1
1 vote, 10.0%
2

3
3 votes, 30.0%
4
2 votes, 20.0%
5
2.95/5 - 11 votes
μ 2.95, σa 3.06 [?]

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

About the Author

Uraan Software Solutions

Founder
Uraan Software Solutions
Germany Germany

Member
We are a software development and consultancy firm based in Lahore, Pakistan.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralError in 'system.drawing.dll' Pinmembercapuccino_fr1:18 3 Apr '06  
GeneralRecommended Changes Pinmembersreejith ss nair0:46 28 Jun '05  

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.

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