Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

An communication error occurred. Printing will be stopped.

Status
Not open for further replies.

MzKitty

Programmer
Oct 28, 2003
254
0
0
US
I'm using vs2008 and am trying to use the activex print control in crystal. I've been surfing the net for a week trying to find something that will get me past this error. I have a report that has 1 parameter in it and it gets passed to a stored procedure. When I click on the print button in the crystal viewer on the webpage (the report views correctly, no problem with it), the print dialog window pops up asking me to select which printer I want to print to. After I click ok, a Crystal Print Control window pops up with the message "An communication error occurred. Printing will be stopped.". I've tried everything, but can't get past this. I need to print 3 crystal reports (1 for the customer, 1 for the office, and one for the warehouse) and they are unique. I would appreciate any help to get me by this problem.

Thanks
Cathy
 
Are you using a local or network printer?
Also, can you please post your code where you are calling your print functions. There may be a piece of code that is creating a conflict.

If at first you don't succeed, then sky diving wasn't meant for you!
 
I'm using my local printer. Here's my code:

saveTicketNo = intTicketNo
crReport = New RptTktOfficeCopy
crTables = crReport.Database.Tables
crViewer3.Visible = False
crViewer2.Visible = False
Dim crParameterFieldDefinitions As ParameterFieldDefinitions
Dim crParameterFieldDefinition As ParameterFieldDefinition
Dim crParameterValues As ParameterValues
Dim crParameterDiscreteValue As ParameterDiscreteValue

crParameterFieldDefinitions = crReport.DataDefinition.ParameterFields
crParameterFieldDefinition = crParameterFieldDefinitions.Item("@TICKETNO")
crParameterValues = crParameterFieldDefinition.CurrentValues
crParameterValues.Clear()

crParameterDiscreteValue = New ParameterDiscreteValue()
crParameterDiscreteValue.Value = saveTicketNo '1st current value
crParameterValues.Add(crParameterDiscreteValue)
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues)
crViewer1.Visible = True
crViewer1.Zoom(100)
crViewer1.PrintMode = PrintMode.ActiveX
crViewer1.ReportSource = crReport

Thanks Cathy
 
Hello MzKitty,

I was reading up on this issue that you are having. From what I can tell, the error occurs due to two main reasons.
The first is that the passed parameters are case sensitive. If there is a difference is case, this error could occur.
The second is that using PrintMode = PrintMode.ActiveX can also cause this error. Apparently there is a bug in the activex control in which BusinessObjects have attempted to address with a patch.

If at first you don't succeed, then sky diving wasn't meant for you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top