Hello all, i am new here and i find this forum really interesting. I have been facing an issue for some time now and hope someone could help me out here. I have a project which i have been trying to add a printing module to be able to show a print preview and then print the report and its been so difficult for me. Can anyone help me with the code to print a report?

Thanks

Recommended Answers

All 8 Replies

I once used this article to help me explain how to print a DataGridView. On the CodeProject site you may find other stuff about printing. Succes!

Printing a report is kind of vague.

What do you want in the report? Is it just text or do you want to do tables and images, or something else?

Thanks ddanbe for the article. Although its useful but i get so many info there which i dont know how to use. I am actually new to developping windows apps using c#. Just as TnTinMn says, i would like to print the text from the report but since the information is coming from a stored data in the database, it involves tables. Can i send the project to any of you so you can check and help insert the printing code?
Thanks

Be my guest. But I can't promise you anything!
Printing is just difficult because all the printerclasses seems to be intertwined, as some sort of spagetti. Once you get the hang of it it will become relatively easy; Will try to guide you. :)

Thanks ddanbe. How do i send you the project? I can upload to dropbox and then send it to you. My email is iykebaba@gmail.com. Can you provide me with the means of how i can send it to you?

Did you notice I posted this snippet some 4 hours ago?

..Just as TnTinMn says, i would like to print the text from the report but since the information is coming from a stored data in the database, it involves tables. Can i send the project to any of you so you can check and help insert the printing code?

I am confused now.

Do want to create a text based report say like you would in a word processor and print? Or are you using the Microsoft Reports (i.e. you created a .rdlc file) and you do not know how to print it?

If it is the second case, see:

Manually Printing a Report

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.