Click here to Skip to main content
15,891,708 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have written an application to record the scores of a golf competition.
The data is held locally in a datatables before being saved as three CSV files when the competition is closed.
I have created a dataview of one of the datatables which when sorted into winning order creates the basis for the results sheet.
I now want to produce the result sheet in the right format and display it on the monitor before printing. I will also save a copy of the results sheet as a PDF file to be displayed later on a WEB site.

My problem I have is that I do not know the best method for creating the results sheet ?

I tried using a windows form but the length of the results sheet is greater than the form height.
The results sheet will also include a picture as the header of the results sheet.
Posted
Comments
Richard MacCutchan 18-Jan-16 11:22am    
Probably a DatagridView is the best choice for a table view.
Dave the Golfer 19-Jan-16 11:23am    
Richard
Thanks for the advice. I am shying away from a DataGridView as I wanted to display the data in the format I want it printed rather than in a spreadsheet format.

If you're using WinForms, you can use PrintDocument Class (System.Drawing.Printing)[^].

If you would like to use reporting tools, you may be interested in:
Crystal Reports[^]
ReportViewer[^]
 
Share this answer
 
Comments
Dave the Golfer 19-Jan-16 11:21am    
Maciej

Thanks for the advice. I will look into the ReportViewer package.
Maciej Los 19-Jan-16 12:39pm    
You're very welcome. Let me know if it would be helpful.
Duncan Edwards Jones 21-Jan-16 4:18am    
I would second the recommendation to use PrintDocument yourself - that way you get full programmatic control over how the output looks.

Have a look at: http://www.codeproject.com/Articles/27404/An-absolute-beginner-s-guide-to-printing-in-NET to start with.
You are using excel -- creat an excel spread sheet form and using c or vb fill in the data.
 
Share this answer
 
Comments
Dave the Golfer 20-Jan-16 17:29pm    
Thanks for your suggestion but I do not wish to use Excel.
Dave the Golfer 29-Jan-16 6:28am    
Revisited your advice and using Excel seems to be the way forward. Thanks very much. Siddharthrout. Com does very good articles on using Excel in VB .net

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900