Click here to Skip to main content
15,891,748 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am going to attach a print button on my form in vb.net but I don't have any idea about the back end programming of
print button.
If any one can help then thanks in advance.
Please give a detailed code for print button.
I want to print my page.
Posted
Updated 7-Sep-11 21:20pm
v2
Comments
Prerak Patel 8-Sep-11 3:20am    
What do you want to print? Form or document?
Karwa_Vivek 8-Sep-11 3:23am    
Goggle this Question First .you will find your Solution.

CP Article[^] about printing.
Otherwise...

This[^] may help.
 
Share this answer
 
 
Share this answer
 
v2
'Name Space
Imports CrystalDecisions.Shared
Imports CrystalDecisions.CrystalReports.Engine


'paste in your print button
'You can change more print options via PrintOptions property of ReportDocument
Dim report As New ReportDocument()
report.Load("C:\My Crystal Reports\Report Name.rpt")
report.PrintToPrinter(1, True, 0, 0)
report.Close()

'after that all you need to do is design your crystal Report
 
Share this answer
 

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