on 02-19-2013 9:12 PM
i created a report using vb.net 2008 and crystal report viewer. if user print the report, I need to recored it.
user click on print button and print dialog show up with default print then user can click print or cancel.
in the report if user click print button, then program should wait for user next action?
if i print, vb debug does not go through? why? how to fix it inde?
thank you
'find the print button control and attach an event to it
For Each Obj As Object In myToolStrip.Items
If TypeOf Obj Is ToolStripButton Then
'Adding a handler for our propose
Dim b As ToolStripButton = CType(Obj, ToolStripButton)
If b.ToolTipText = "Print Report" Then
AddHandler CType(Obj, ToolStripButton).Click, AddressOf printButton_Click
End If
End If
Next
Private Sub printButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
If updateReportStats Then
Try
If Windows.Forms.DialogResult.OK Then
'Put your stuff here
UpdatePrintDate()
MessageBox.Show(" print")
'Else
'Windows.Forms.DialogResult.Cancel()
End If
Catch ex As Exception
End Try
End If
end sub
Hello Sunny
Entering the search term 'event crystal net', in the search box in the top right corner of this web page returns the following KBA:
Please see if the KBA helps. (Make sure you're on SP5 for CR 2008)
- Ludek
Follow us on Twitter
Got Enhancement ideas? Try the SAP Idea Place
Share Your Knowledge in SCN Topic Spaces
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i want to record date and time printed to database.
Normally "when user click on the crystal report viewer control print button . print dialog box appear". here user print the report. i want to insert the printed date and time to database.
is it possible to write code for the print button of the crystal report viewer control.
i couldn't find a solution for it. plz anyone help me with this code problem.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.