Post Author: glauzier
CA Forum: Deployment
Hi,
I don't know if I'm posting at the right place...
I developped a web solution in VB.net 2.0 with the built-in Crystal Report(10.2.3600) to print labels on a DataMax printer...
This printer isn't the default one on the user's pc, so I change the printerName accordingly to the name in the printer control panel...but I get an error saying the printer name is invalid. The printer's security is set to give all necessary permissions to All Users.
If I just use the default printer (Xerox Pro 55), the labels are printed without problems(on standard paper thought).
That is my code:
<code>
Dim intCopies As Integer
Try
intCopies = CInt(Me.txtNbCopies.Text)
Catch
Exit Sub
End Try
Dim reportPath As String
Dim reportName As String
Dim reportdoc As New ReportDocument
Me.lblMessage.Text = ""
reportName = "EtiquetteVierge.rpt"
reportPath = Server.MapPath("~/Rapport/" & reportName)
reportdoc.Load(reportPath)
reportdoc.PrintOptions.PrinterName = "Datamax I-4208"
reportdoc.SetParameterValue("adresse", address)
reportdoc.SetParameterValue("Province", province)
reportdoc.PrintToPrinter(intCopies, False, 1, 1)
reportdoc.Close()
reportdoc.Dispose()
</code>
If anyone has a clue, I'll be glad to get some help.
Thank you
Glauzier